package com.tianqu.tms.entity;

import java.io.File;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;

import com.tianqu.tms.core.exception.TmsDaoException;
import com.tianqu.tms.core.util.CopyFile;
import com.tianqu.tms.core.util.DateUtil;
import com.tianqu.tms.core.util.ImageUtils;
import com.tianqu.tms.core.util.Registry;
import com.tianqu.tms.core.util.StringUtil;
import com.tianqu.tms.core.util.TmsConstants;
import com.tianqu.tms.dao.AttnDao;
import com.tianqu.tms.dao.TmsDao;
import com.tianqu.tms.dao.TransferAcceptedInfoDao;
import com.tianqu.tms.dao.ViewListDao;
import com.tianqu.tms.dto.AttnDto;
import com.tianqu.tms.dto.TransferAcceptedInfoDto;

/**
 * 待办信息表
 * 
 * @author tianshifu
 * 
 */
public class TransferAcceptedInfo extends ViewListManager {

	/**
	 * 
	 */
	private static final long serialVersionUID = -5849950089297674445L;

	private int id; // Id
	private int cssFlag;
	private String carType;
	private String serial; // 车辆流水号
	private int marketType;// 库存车辆状态
	private String basicCarId;// 基本信息关联ID
	private String licensePlate;// 车牌号码
	private String newLicensePlate;// 车牌号码
	private int reapplyCert;
	private String attachMemberId;
	private String vin;// Vin
	private String cy_cardType;// 号牌种类
	private int ownerType;// 原车主类型
	private String carOwner;// 车主姓名
	private String carOwnerIdCardNo;// 车主身份证号
	private String ownerOrgNo;// 组织机构代码证号
	private String ownerAddress;// 车主地址
	private String ownerPhone;// 原车主手机号码
	private int registration;// 注册登记
	private int transfer;// 转入
	private int transferRegister;// 转移登记
	private int changesVacate;// 变更迁出
	private int changeColor;// 变更车身颜色
	private int conformityMark;// 核发检验合格标志
	private int changeBody;// 更换车身或车架
	private int changeEngine;// 更换发动机
	private int changeUsenature;// 变更使用性质
	private int repeatVIN;// 重新打刻VIN
	private int repeatEngineNum;// 重新打刻发动机号
	private int changeAllCar;// 更换整车
	private int applyCertificate;// 申领登记证书
	private int replacementCertificate;// 补领登记证书
	private int monitoringSales;// 监销
	private int other;// 其他
	private String vinNum;// 车辆识别代号
	private String engineNum;// 发动机型号/号码
	private String cy_color;// 车身颜色
	private String cy_passenger;// 核定载人数
	private String cy_carType;// 车辆类型
	private String plateOrTireExterior;// 号牌/车辆外观形状
	private String tireIntact;// 轮胎完好情况
	private String seatBelt;// 安全带、三角警告牌
	private String numberAxes;// 外廓尺寸、轴数
	private String tireSize;// 轮胎规格
	private String lateralPortionOf;// 侧后部防护装置
	private String reflectiveMark;// 车身反光标示
	private String fireExtinguisher;// 灭火器
	private String drivingRecord;// 行驶记录装置
	private String security;// 安全出口、安全锤
	private String externalMarking;// 外部标示、文字
	private String Siren;// 标志灯具、警报器
	private String securityTechnology;// 安全技术检验合格证明
	private String checkConclusion;// 查验结论
	private String photo_1;// 左前车图
	private String photo_2;// 右前车图
	private String photo_3;// 左后车图
	private String photo_4;// 右后车图
	private String remark;// 备注
	private int lc_printNum;// 流程表打印次数
	private int cy_printNum;// 查验表打印次数
	private int pg_price;// 评估价格
	private int pg_printNum;// 评估表打印次数
	private int db_printNum;// 代办单打印次数
	private String carOwnerIdCardNoOld;// 原车主身份证号（旧）
	private String ownerAddressOld;// 原车主住址(旧)
	private String agentName;// 原车主代理人姓名
	private String agentOwnerIdCardNo;// 原车主代理人身份证号
	private String agentAddress;// 原车主代理人住址
	private String agentPhone;// 原车主代理人电话
	private int newOwnerType;// 新车主类别
	private String newcarOwner;// 新车主姓名
	private String newcarOwnerIdCardNo;// 新车主身份证号
	private String newOwnerPhone;// 新车主手机号码
	private String newOwnerAddress;// 新车主住址
	private String newOwnerOrgNo;// 新车主组织机构代码证号
	private String zipCode;// 新车主邮编
	private String mailAddress;// 新车主邮寄地址
	private String newAgentName;// 新车主代理人姓名
	private String newAgentOwnerIdCardNo;// 新车主代理人身份证号
	private String newAgentAddress;// 新车主代理人住址
	private String newAgentPhone;// 新车主代理人电话
	private String ownersGroupPhoto;// 车主照片
	private String materialImages1;// 资料图片1
	private String materialImages2;// 资料图片2
	private String materialImages3;// 资料图片3
	private String materialImages4;// 资料图片4
	private String materialImages5;// 资料图片5
	private String materialImages6;// 资料图片6
	private String materialImages7;// 资料图片7
	private String materialImages8;// 资料图片8
	private String materialImages9;// 资料图片9
	private String materialImages10;// 资料图片10
	private String proName;
	private String cityName;
	private int price;// 交易价格
	private int transferPrice;// 过户费
	private int lastPrice;// 实收金额
	private int businessType;// 工商验证状态
	private int sourceType;// 车辆来源状态
	private int status;// 车辆过户状态
	private Timestamp agentTime;// 代办受理日期
	private int gh_printnum;// 打印次数
	private int printStatus;// 打印标记
	private int transferType;// 申请事项
	private String carMarketIn;// 转入车辆管理所
	private String moveOutProvince;// 转出车辆管理所（省）
	private String moveOutCity;// 转出车辆管理所（市）
	private String taxNo;// 增值税完税证号
	private String paymentPeople;// / 交款人
	private int gainType;// 获得方式
	private String managersId;// 经办人Id
	private int insertUserid;// 受理人/插入用户
	private Timestamp insertTime;// 受理时间/插入时间
	private Date updateTime;// 更新时间
	private int updateUserId;// 更新用户
	private String pg_time;
	private int lz_printnum;
	private Date lz_printTime;
	private int lz_printUserId;
	private String licensePlateCol;
	private int cflag;// 1,2区别（列表样式灰白区分）
	private int num;// 列表的序号
	private String insertTimeS;// 查验列表中显示的受理时间
	private String checkFileTimeS;
	private Timestamp checkPriceDate;
	private Timestamp transferPriceDate;
	private String brandModel;
	private String modelCode;
	private String vendorCode;
	private int checkPrice;// 流程表缴费
	private String ownerTypeName;// 车主类型名
	private String userName;//查验照相者

	/** 追加 */
	private int carClass;// 车辆分类
	private String lc_printTime;// 流程表打印日期
	private int lc_printUserId;// 流程表打印操作员ID
	private String cy_printTime;// 查验表打印日期
	private int cy_printUserId;// 查验表打印操作员ID
	private String pg_printTime;// 评估表打印日期
	private int pg_printUserId;// 评估表打印操作员ID
	private String db_printTime;// 代办表打印日期
	private int db_printUserId;// 代办表打印操作员ID
	private String newOwnerTelPhone;// 新车主固定号码
	private int extendedPrice;// 待办超期/过期费
	private int doubleTransferPrice;// 二次过户费
	private String gh_printTime;// 交易票打印日期
	private int gh_printUserId;// 交易票打印操作员ID
	private String transNo;// 交易票发票号码
	private String transMarket;// 交易票所属市场
	private String attnId;// 经办人Id
	private int zy_printnum;
	private String zy_printTime;
	private int zy_printUserId;
	private int xs_printnum;
	private String xs_printTime;
	private int xs_printUserId;
	private String newOwnerZipCode;
	private Timestamp licenseAccepTime;
	private String newOwnerMailAddress;
	private int preTransfer;
	private int changeTradeTicket;// 是否打印交易跑
	private int waitForStatus;// 车辆待办状态
	private String licenseAccepTimeS;
	private int checkUserid;
	private String updateUserName;
	private String vonderModel;

	private Timestamp checkFileTime;// 送审档时间
	private Timestamp checkFileBackTime;// 审档送回时间
	private int picChangeNum;
	private Timestamp picChangeTime;
	private int picChangeUserId;
	private String memberId;// add by huangwei
	private int checkFileStatus;// add by huangheli
	private String vendorId;// 车辆品系ID
	private String brandId;// 车系ID
	private String carStyleId;// 车辆款式
	private String carName;// 车辆名称
	private int isMatch;// 是否匹配
	private String memberRealName;
	private String carUse;
	private String countryStyle;
	private String registerCardNo;
	private Timestamp regDate;
	private String shortName;
	
	private int carMarketInProv;// 转入车管所（省）
	private int carMarketInCity;// 转入车管所（市）
	private String shiftToLevel;// 值为转入要求
	
	private int epStandard;// 环保达标
	private int carReplaceType;// 客车换型
	private int carPeccancy;// 车辆违章
	private int overdue;// 超检审核
	private int mortgage;// 抵押审核
	private int sealup;// 查封审核
	private int drivingLicense;// 行驶证
	private int scrapOverdue;// 报废超期
	private int robbery;// 盗抢审核
	private String psRemark;// 公安审核备注
	private int ownerEscaping;// 原车主在逃
	private int ownerScrap;// 原车主报废车
	private String ownerRemark;// 原车主备注
	private int newEscaping;// 新车主在逃
	private int newScrap;// 新车主报废车
	private int newLive;// 新车主居住证
	private String newRemark;// 新车主备注
	private String attnName;
	private String realName;
	private int cardType;
	private String transferReason;
	
	public int getCardType() {
        return cardType;
    }

    public void setCardType(int cardType) {
        this.cardType = cardType;
    }

    public String getTransferReason() {
		return transferReason;
	}

	public void setTransferReason(String transferReason) {
		this.transferReason = transferReason;
	}

	public Timestamp getRegDate() {
		return regDate;
	}

	
	public String getCarType() {
		return carType;
	}


	public void setCarType(String carType) {
		this.carType = carType;
	}


	public void setRegDate(Timestamp regDate) {
		this.regDate = regDate;
	}

	public String getShortName() {
		return shortName;
	}

	public void setShortName(String shortName) {
		this.shortName = shortName;
	}

	public String getRegisterCardNo() {
		return registerCardNo;
	}

	public void setRegisterCardNo(String registerCardNo) {
		this.registerCardNo = registerCardNo;
	}

	public String getCarUse() {
		return carUse;
	}

	public void setCarUse(String carUse) {
		this.carUse = carUse;
	}

	public String getCountryStyle() {
		return countryStyle;
	}

	public void setCountryStyle(String countryStyle) {
		this.countryStyle = countryStyle;
	}

	public String getMemberRealName() {
		return memberRealName;
	}

	public void setMemberRealName(String memberRealName) {
		this.memberRealName = memberRealName;
	}
	

	public String getMaterialImages6() {
		return materialImages6;
	}

	public void setMaterialImages6(String materialImages6) {
		this.materialImages6 = materialImages6;
	}

	public String getMaterialImages7() {
		return materialImages7;
	}

	public void setMaterialImages7(String materialImages7) {
		this.materialImages7 = materialImages7;
	}

	public String getMaterialImages8() {
		return materialImages8;
	}

	public void setMaterialImages8(String materialImages8) {
		this.materialImages8 = materialImages8;
	}

	public String getMaterialImages9() {
		return materialImages9;
	}

	public void setMaterialImages9(String materialImages9) {
		this.materialImages9 = materialImages9;
	}

	public String getMaterialImages10() {
		return materialImages10;
	}

	public void setMaterialImages10(String materialImages10) {
		this.materialImages10 = materialImages10;
	}

	/**
	 * 
	 */

	public static TransferAcceptedInfo getInstance() {
		TransferAcceptedInfo trans = new TransferAcceptedInfo();
		trans.setExisting(false);
		return trans;
	}

	/**
	 * 根据车辆编号载入过户信息
	 * 
	 * @param basicCarId
	 * @return
	 * @throws TmsDaoException
	 */
	public TransferAcceptedInfo getTransferBybasicCarId(String basicCarId) throws TmsDaoException {
		TransferAcceptedInfo entity = new TransferAcceptedInfo();
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		TransferAcceptedInfoDto dto = uDao.getTransferByBasicCarId(basicCarId);
		if (dto != null) {
			entity = setEntityFromDto(entity, dto);
		}
		return entity;
	}

	public TransferAcceptedInfo findCarByLicense(String licenPlate) throws TmsDaoException {
		TransferAcceptedInfo entity = new TransferAcceptedInfo();
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);

		TransferAcceptedInfoDto dto = uDao.findCarByLicense(licenPlate);
		if (dto != null) {
			entity = setEntityFromDto(entity, dto);
		}
		return entity;
	}

	public List<TransferAcceptedInfoDto> findReCar(String value,int type) throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		return uDao.findReCar(value,type);
	}

	/**
	 * 根据流水号修改过户信息
	 * 
	 * @param entity
	 * @throws TmsDaoException
	 */
	public void updateTransferAcceptedInfoBySerial(TransferAcceptedInfo entity) throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		TransferAcceptedInfoDto dto = new TransferAcceptedInfoDto();
		dto = entityToDtoBySerial(entity, dto);
		uDao.updateAcceptInfoBySerial(dto);

	}

	public void updateAcceptInfoBySerial(int cyPrintNum, int lcPrintNum,String serial)throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		uDao.updateAcceptInfoBySerial(cyPrintNum,lcPrintNum,serial);
	}
	
	public void updateAcceptInfo4TransferConfirmBySerial(TransferAcceptedInfoDto dto) throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		uDao.updateAcceptInfo4TransferConfirmBySerial(dto);
	}
	
	public boolean isTransferCompleted(String v,int type,boolean isPayment)throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		TransferAcceptedInfoDto dto = uDao.checkTransferCompleted(v,type);
		if(isPayment && dto!=null && (dto.getStatus() ==0 || dto.getStatus() ==16)) {
			return true;
		}else if(!isPayment && dto!=null && dto.getStatus() ==16) {
			return true;
		}
		return false;
	}
	
	/**
	 * 待录入，基本信息修改部分
	 * 
	 * @param entity
	 * @throws TmsDaoException
	 */
	public void updateAcceptedInfoBySerial(TransferAcceptedInfo entity) throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		TransferAcceptedInfoDto dto = new TransferAcceptedInfoDto();
		dto.setSerial(entity.getSerial());
		dto.setUpdateUserId(entity.getUpdateUserId());
		dto.setCarOwner(entity.getCarOwner());
		dto.setCarOwnerIdCardNo(entity.getCarOwnerIdCardNo());
		dto.setOwnerPhone(entity.getOwnerPhone());
		dto.setOwnerAddress(entity.getOwnerAddress());
		dto.setOwnerOrgNo(entity.getOwnerOrgNo());
		dto.setOwnerType(entity.getOwnerType());
		dto.setLc_printNum(entity.getLc_printNum());
		dto.setCy_printNum(entity.getCy_printNum());
		uDao.updateAcceptInfoMarketBySerial(dto);
	}

	/**
	 * 根据车辆编号更新流程表打印信息
	 * 
	 * @param entity
	 * @throws TmsDaoException
	 */
	public void updateTransferAcceptedLCByBasicCarId(TransferAcceptedInfo entity) throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		TransferAcceptedInfoDto dto = new TransferAcceptedInfoDto();
		dto.setBasicCarId(entity.getBasicCarId());
		dto.setCarOwner(entity.getCarOwner());
		dto.setLc_printNum(entity.getLc_printNum());
		dto.setLc_printUserId(entity.getLc_printUserId());
		dto.setStatus(entity.getStatus());
		dto.setUpdateUserId(entity.getUpdateUserId());
		uDao.updateTransferAcceptedLCByBasicCarId(dto);

	}

	public int getReapplyCert() {
		return reapplyCert;
	}

	public void setReapplyCert(int reapplyCert) {
		this.reapplyCert = reapplyCert;
	}

	public String getAttachMemberId() {
		return attachMemberId;
	}

	public void setAttachMemberId(String attachMemberId) {
		this.attachMemberId = attachMemberId;
	}

	public List findCheckCarList(String vin, String licenseplate) throws TmsDaoException, ParseException {
		List<TransferAcceptedInfoDto> checkList = new ArrayList<TransferAcceptedInfoDto>();
		TransferAcceptedInfoDao transferAcceptedInfoDao = (TransferAcceptedInfoDao) TmsDao
				.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO, getPageNo(), getMaxIndex(), getSortKey(), isAsc());
		ViewListDao idao = (ViewListDao) TmsDao.getViewListDao((TmsDao) transferAcceptedInfoDao,
				TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		checkList = transferAcceptedInfoDao.findCheckCarList(vin, licenseplate);
		List carCheckList = new ArrayList();
		Codes code = Codes.getInstance();
		int i = 1;
		for (TransferAcceptedInfoDto dto : checkList) {
			TransferAcceptedInfo entity = new TransferAcceptedInfo();
			entity.setSerial(dto.getSerial());
			entity.setLicensePlate(dto.getLicensePlate());
			entity.setCy_cardType(code.getItemValueByItemIdAndItemCode(Codes.PLATE_TYPE, dto.getCardType()));
			entity.setPhoto_1(dto.getPhoto_1());
			entity.setNum(i);
			if (i % 2 != 0)
				entity.setCflag(1);
			else
				entity.setCflag(2);
			entity.setVin(dto.getVin());
			int inds = dto.getInds();
			if (inds > 0) {
				entity.setInsertTimeS(inds + "天前");
			} else {
				entity.setInsertTimeS(dto.getInsertTimeS());
			}
			entity.setCarOwner(dto.getCarOwner());
			// 这块存的是名字
			if (dto.getOwnerType() > 0) {
				entity.setOwnerTypeName(code.getItemValueByItemIdAndItemCode(Codes.CAR_OWNER, dto.getOwnerType()));
			} else {
				entity.setOwnerTypeName("-");
			}

			entity.setLc_printNum(dto.getLc_printNum());
			entity.setCy_printNum(dto.getCy_printNum());
			entity.setSourceType(dto.getSourceType());
			entity.setCheckPrice(dto.getCheckPrice());
			entity.setCheckPriceDate(dto.getCheckPriceDate());
			User user = new User();
			user = user.getUserInfoById(dto.getUpdateUserId());
			if (user != null) {
				entity.setUpdateUserName(user.getRealName());
			}
			carCheckList.add(entity);
			i++;
		}
		setPagingInfo(idao);
		return carCheckList;
	}

	/**
	 * 车辆查验列表
	 * 
	 * @return
	 * @throws TmsDaoException
	 * @throws ParseException
	 */
	@SuppressWarnings("unchecked")
	public List findCheckCarList(String listFlag) throws TmsDaoException, ParseException {
		TransferAcceptedInfoDao transferAcceptedInfoDao = (TransferAcceptedInfoDao) TmsDao
				.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO, getPageNo(), getMaxIndex(), getSortKey(), isAsc());
		ViewListDao idao = (ViewListDao) TmsDao.getViewListDao((TmsDao) transferAcceptedInfoDao,
				TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		List<TransferAcceptedInfoDto> checkList = new ArrayList<TransferAcceptedInfoDto>();
		if ("1".equals(listFlag) || listFlag == null) {// 今天数据
			checkList = transferAcceptedInfoDao.findCheckCarList(1);
		} else {// 历史数据
			checkList = transferAcceptedInfoDao.findCheckCarList(2);
		}

		List carCheckList = new ArrayList();
		Codes code = Codes.getInstance();
		int i = 1;
		for (TransferAcceptedInfoDto dto : checkList) {
			TransferAcceptedInfo entity = new TransferAcceptedInfo();
			entity.setSerial(dto.getSerial());
			entity.setLicensePlate(dto.getLicensePlate());
			entity.setCy_cardType(code.getItemValueByItemIdAndItemCode(Codes.PLATE_TYPE, dto.getCardType()));
			entity.setPhoto_1(dto.getPhoto_1());
			entity.setNum(i);
			if (i % 2 != 0) {
				entity.setCflag(1);
			} else {
				entity.setCflag(2);
			}
			entity.setVin(dto.getVin());
			int inds = dto.getInds();
			if (inds > 0) {
				entity.setInsertTimeS(inds + "天前");
			} else {
				entity.setInsertTimeS(dto.getInsertTimeS());
			}
			entity.setCarOwner(dto.getCarOwner());
			// 这块存的是名字
			if (dto.getOwnerType() > 0) {
				entity.setOwnerTypeName(code.getItemValueByItemIdAndItemCode(Codes.CAR_OWNER, dto.getOwnerType()));
			} else {
				entity.setOwnerTypeName("-");
			}

			entity.setLc_printNum(dto.getLc_printNum());
			entity.setCy_printNum(dto.getCy_printNum());
			entity.setSourceType(dto.getSourceType());
			entity.setCheckPrice(dto.getCheckPrice());
			entity.setCheckPriceDate(dto.getCheckPriceDate());
			User user = new User();
			user = user.getUserInfoById(dto.getUpdateUserId());
			if (user != null) {
				entity.setUpdateUserName(user.getRealName());
			}
			entity.setUserName(dto.getUserName());
			carCheckList.add(entity);
			i++;
		}
		setPagingInfo(idao);
		return carCheckList;
	}

	public List loadReAcceptList() throws TmsDaoException {
		List<TransferAcceptedInfoDto> reAcceptList = new ArrayList<TransferAcceptedInfoDto>();
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		reAcceptList = uDao.loadReAcceptList();
		List reAccList = new ArrayList();
		Codes code = Codes.getInstance();
		//
		int i = 1;
		if (reAcceptList != null && reAcceptList.size() > 0) {
			for (TransferAcceptedInfoDto dto : reAcceptList) {
				TransferAcceptedInfo entity = new TransferAcceptedInfo();

				entity.setSerial(dto.getSerial());
				entity.setLicensePlate(dto.getLicensePlate());
				entity.setCy_cardType(code.getItemValueByItemIdAndItemCode(Codes.PLATE_TYPE, dto.getCardType()));
				entity.setMaterialImages1(dto.getMaterialImages1());
				entity.setMaterialImages2(dto.getMaterialImages2());
				entity.setMaterialImages3(dto.getMaterialImages3());
				entity.setMaterialImages4(dto.getMaterialImages4());
				entity.setMaterialImages5(dto.getMaterialImages5());
				entity.setCheckPrice(dto.getCheckPrice());
				entity.setTransferPrice(dto.getTransferPrice());
				entity.setInsertTimeS(dto.getInsertTimeS());
				entity.setLicensePlateCol(dto.getLicensePlateCol());
				entity.setCarOwner(dto.getCarOwner());
				entity.setCheckPriceDate(dto.getCheckPriceDate());
				entity.setTransferPriceDate(dto.getTransferPriceDate());
				entity.setNum(i);
				if (i % 2 != 0) {
					entity.setCflag(1);
				} else {
					entity.setCflag(2);
				}
				int inds = dto.getInds();
				if (inds > 0) {
					entity.setInsertTimeS(inds + "天前");
				} else {
					entity.setInsertTimeS(dto.getInsertTimeS());
				}
				reAccList.add(entity);
				i++;
			}
		}
		return reAccList;
	}

	/**
	 * 根据流水号查询受理信息
	 * 
	 * @return
	 * @throws TmsDaoException
	 */
	public TransferAcceptedInfo getAssessInfoBySerial(String serial) throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);

		TransferAcceptedInfoDto dto = uDao.getAssessInfoBySerial(serial);

		if (dto != null) {
			return setEntityFromDto(new TransferAcceptedInfo(), dto);
		}

		return null;
	}

	/***
	 * 根据车牌号码查询查验车辆是否在过户中
	 * 
	 * @param licenseplate
	 * @return
	 * @throws TmsDaoException
	 */
	public TransferAcceptedInfo findByLicenseplate(String licenseplate) throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);

		TransferAcceptedInfoDto dto = uDao.getAssessInfoByLicenseplate(licenseplate);

		if (dto != null) {
			return setEntityFromDto(new TransferAcceptedInfo(), dto);
		}

		return null;
	}

	public TransferAcceptedInfo findByVin(String vin) throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);

		TransferAcceptedInfoDto dto = uDao.getAssessInfoByVin(vin);

		if (dto != null) {
			return setEntityFromDto(new TransferAcceptedInfo(), dto);
		}

		return null;
	}

	public TransferAcceptedInfo findByVinAtGh(String vin) throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		TransferAcceptedInfoDto dto = uDao.findByVinAtGh(vin);
		if (dto != null) {
			return setEntityFromDto(new TransferAcceptedInfo(), dto);
		}

		return null;
	}

	/**
	 * 将Dto信息set到entity中
	 * 
	 * @return
	 */
	public TransferAcceptedInfo setEntityFromDto(TransferAcceptedInfo entity,
			TransferAcceptedInfoDto dto) {
		entity.setId(dto.getId());
		if(dto.getMarketType()!=null) entity.setMarketType(dto.getMarketType());
		entity.setPg_price(dto.getPg_price());
		entity.setVin(dto.getVin());
		entity.setLicensePlate(dto.getLicensePlate());
		if(dto.getStatus()!=null) entity.setStatus(dto.getStatus());
		entity.setAgentName(dto.getAgentName());
		entity.setCarUse(dto.getCarUse());
		entity.setMemberRealName(dto.getMemberRealName());
		entity.setAgentOwnerIdCardNo(dto.getAgentOwnerIdCardNo());
		entity.setAgentAddress(dto.getAgentAddress());
		entity.setMaterialImages2(dto.getMaterialImages2());
		entity.setMaterialImages1(dto.getMaterialImages1());
		entity.setMaterialImages3(dto.getMaterialImages3());
		entity.setMaterialImages4(dto.getMaterialImages4());
		entity.setMaterialImages5(dto.getMaterialImages5());
		entity.setRegisterCardNo(dto.getRegisterCardNo());
		entity.setOwnersGroupPhoto(dto.getOwnersGroupPhoto());
		entity.setAgentPhone(dto.getAgentPhone());
		entity.setAgentTime(dto.getAgentTime());
		entity.setTransferPriceDate(dto.getTransferPriceDate());
		//
		entity.setSerial(dto.getSerial());
		entity.setBasicCarId(dto.getBasicCarId());
		entity.setNewAgentAddress(dto.getNewAgentAddress());
		entity.setNewAgentName(dto.getNewAgentName());
		entity.setNewAgentOwnerIdCardNo(dto.getNewAgentOwnerIdCardNo());
		entity.setNewAgentPhone(dto.getNewAgentPhone());
		entity.setNewcarOwner(dto.getNewcarOwner());
		entity.setNewcarOwnerIdCardNo(dto.getNewcarOwnerIdCardNo());
		entity.setNewOwnerAddress(dto.getNewOwnerAddress());
		entity.setNewOwnerOrgNo(dto.getNewOwnerOrgNo());
		entity.setNewOwnerType(dto.getNewOwnerType());
		if(dto.getPrice()!=null) entity.setPrice(dto.getPrice());
		entity.setGainType(dto.getGainType());
		entity.setTransferType(dto.getTransferType());
		entity.setTaxNo(dto.getTaxNo());
		entity.setMailAddress(dto.getMailAddress());
		entity.setMoveOutCity(dto.getMoveOutCity());
		entity.setMoveOutProvince(dto.getMoveOutProvince());
		entity.setCarMarketIn(dto.getCarMarketIn());
		entity.setNewOwnerPhone(dto.getNewOwnerPhone());
		entity.setZipCode(dto.getZipCode());
		entity.setLc_printNum(dto.getLc_printNum());
		if(dto.getCy_cardType()!=null)  entity.setCy_cardType(String.valueOf(dto.getCy_cardType()));
		entity.setBusinessType(dto.getBusinessType());
		entity.setVinNum(dto.getVinNum());
		entity.setEngineNum(dto.getEngineNum());
		entity.setTransferPrice(dto.getTransferPrice());
		entity.setExtendedPrice(dto.getExtendedPrice());
		entity.setDoubleTransferPrice(dto.getDoubleTransferPrice());
	
		entity.setTransNo(dto.getTransNo());
		entity.setTransMarket(dto.getTransMarket());
		// 少个字段
		entity.setCy_color(dto.getCy_color());
		entity.setCy_passenger(dto.getCy_passenger());
		entity.setCy_carType(dto.getCy_carType());
		entity.setPlateOrTireExterior(dto.getPlateOrTireExterior());
		entity.setTireIntact(dto.getTireIntact());

		entity.setSeatBelt(dto.getSeatBelt());
		entity.setNumberAxes(dto.getNumberAxes());
		entity.setTireSize(dto.getTireSize());
		entity.setLateralPortionOf(dto.getLateralPortionOf());
		entity.setReflectiveMark(dto.getReflectiveMark());

		entity.setFireExtinguisher(dto.getFireExtinguisher());
		entity.setDrivingRecord(dto.getDrivingRecord());
		entity.setSecurity(dto.getSecurity());
		entity.setExternalMarking(dto.getExternalMarking());
		entity.setSiren(dto.getSiren());

		entity.setSecurityTechnology(dto.getSecurityTechnology());
		entity.setCheckConclusion(dto.getCheckConclusion());
		entity.setInsertUserid(dto.getInsertUserid());
		entity.setInsertTime(dto.getInsertTime());

		entity.setPhoto_1(dto.getPhoto_1());
		entity.setPhoto_2(dto.getPhoto_2());
		entity.setPhoto_3(dto.getPhoto_3());
		entity.setPhoto_4(dto.getPhoto_4());

		entity.setBrandModel(dto.getBrandModel());
		entity.setCarOwner(dto.getCarOwner());
		entity.setCy_printNum(dto.getCy_printNum());
		entity.setRegistration(dto.getRegistration());
		entity.setTransfer(dto.getTransfer());
		entity.setTransferRegister(dto.getTransferRegister());
		entity.setChangesVacate(dto.getChangesVacate());
		entity.setChangeColor(dto.getChangeColor());
		entity.setConformityMark(dto.getConformityMark());
		entity.setChangeBody(dto.getChangeBody());
		entity.setChangeEngine(dto.getChangeEngine());
		entity.setChangeUsenature(dto.getChangeUsenature());
		entity.setRepeatVIN(dto.getRepeatVIN());
		entity.setRepeatEngineNum(dto.getRepeatEngineNum());
		entity.setChangeAllCar(dto.getChangeAllCar());
		entity.setApplyCertificate(dto.getApplyCertificate());
		entity.setReplacementCertificate(dto.getReplacementCertificate());
		entity.setMonitoringSales(dto.getMonitoringSales());
		entity.setOther(dto.getOther());
		entity.setOwnerType(dto.getOwnerType());// 车主类型

		entity.setPg_printNum(dto.getPg_printNum());
		entity.setDb_printNum(dto.getDb_printNum());

		entity.setUpdateTime(dto.getUpdateTime());
		entity.setUpdateUserId(dto.getUpdateUserId());

		entity.setNewOwnerTelPhone(dto.getNewOwnerTelPhone());
		entity.setExtendedPrice(dto.getExtendedPrice());
		entity.setTransNo(dto.getTransNo());
		entity.setTransMarket(dto.getTransMarket());
		entity.setAttnId(dto.getAttnId());
		entity.setZy_printnum(dto.getZy_printnum());
		entity.setZy_printUserId(dto.getZy_printUserId());
		entity.setGh_printnum(dto.getGh_printnum());
		entity.setGh_printUserId(dto.getGh_printUserId());
		entity.setSourceType(dto.getSourceType());
		entity.setLz_printnum(dto.getLz_printnum());
		entity.setLz_printUserId(dto.getLz_printUserId());
		entity.setXs_printnum(dto.getXs_printnum());
		entity.setXs_printUserId(dto.getXs_printUserId());
		entity.setInsertTimeS(dto.getInsertTimeS());
		entity.setLc_printTime(DateUtil.getDateByTimeStampHM(dto.getLc_printTime()));
		entity.setCy_printTime(DateUtil.getDateByTimeStampHM(dto.getCy_printTime()));
		entity.setPg_time(dto.getPg_time());
		entity.setPg_printTime(DateUtil.getDateByTimeStampHM(dto.getPg_printTime()));
		entity.setDb_printTime(DateUtil.getDateByTimeStampHM(dto.getDb_printTime()));
		entity.setGh_printTime(DateUtil.getDateByTimeStampHM(dto.getGh_printTime()));
		entity.setZy_printTime(DateUtil.getDateByTimeStampHM(dto.getZy_printTime()));
		entity.setLz_printTime(dto.getLz_printTime());
		entity.setXs_printTime(DateUtil.getDateByTimeStampHM(dto.getXs_printTime()));
		entity.setLicenseAccepTimeS(DateUtil.getDateByTimeStampHM(dto.getLicenseAccepTime()));
		entity.setLc_printUserId(dto.getLc_printUserId());
		entity.setCy_printUserId(dto.getCy_printUserId());
		entity.setPg_printUserId(dto.getPg_printUserId());
		entity.setDb_printUserId(dto.getDb_printUserId());
		entity.setZy_printUserId(dto.getZy_printUserId());
		entity.setGh_printUserId(dto.getGh_printUserId());
		entity.setRemark(dto.getRemark());
		entity.setNewOwnerZipCode(dto.getNewOwnerZipCode());
		entity.setNewOwnerMailAddress(dto.getNewOwnerMailAddress());
		entity.setUpdateTime(dto.getUpdateTime());
		if(dto.getPreTransfer() == 0)
		{
			entity.setPreTransfer(2);
		}else{
			entity.setPreTransfer(dto.getPreTransfer());
		}

		entity.setChangeTradeTicket(dto.getChangeTradeTicket());
		if(dto.getCarClass()!=null) entity.setCarClass(dto.getCarClass());
		entity.setOwnerPhone(dto.getOwnerPhone());
		entity.setOwnerAddress(dto.getOwnerAddress());
		entity.setCarOwnerIdCardNo(dto.getCarOwnerIdCardNo());
		entity.setOwnerOrgNo(dto.getOwnerOrgNo());
		entity.setWaitForStatus(dto.getWaitForStatus());
		entity.setCheckUserid(dto.getCheckUserid());
		entity.setPicChangeNum(dto.getPicChangeNum());
		entity.setMemberId(dto.getMemberId());
		entity.setCheckFileStatus(dto.getCheckFileStatus());
		entity.setNewLicensePlate(dto.getNewLicensePlate());
		entity.setReapplyCert(dto.getReapplyCert());
		entity.setAttachMemberId(dto.getAttachMemberId());
		entity.setCheckPriceDate(dto.getCheckPriceDate());
		entity.setInsertTime(dto.getInsertTime());
		// #104 start
		entity.setIsMatch(dto.getIsMatch());
		entity.setBrandId(dto.getBrandId());
		// #104 e n d
		entity.setCarName(dto.getCarName());
		entity.setBrandId(dto.getBrandId());
		entity.setChangeBody(dto.getChangeBody());
		entity.setCarStyleId(dto.getCarStyleId());
		if (dto.getMarketType() != null) entity.setMarketType(dto.getMarketType());
		if (dto.getStatus() != null) entity.setStatus(dto.getStatus());
		entity.setMaterialImages6(dto.getMaterialImages6());
		entity.setMaterialImages7(dto.getMaterialImages7());
		entity.setMaterialImages8(dto.getMaterialImages8());
		entity.setMaterialImages9(dto.getMaterialImages9());
		entity.setMaterialImages10(dto.getMaterialImages10());
		entity.setModelCode(dto.getModelCode());
		entity.setVendorCode(dto.getVendorCode());
		entity.setVendorId(dto.getVendorId());
		entity.setIsMatch(dto.getIsMatch());
		if (dto.getPrice() != null) 	entity.setPrice(dto.getPrice());
		entity.setNewOwnerZipCode(dto.getNewOwnerZipCode());
		entity.setCy_carType(dto.getCarType());
		entity.setCarType(dto.getCarType());
		entity.setDb_printTime(DateUtil.getDateByTimeStampHM(dto.getDb_printTime()));
		entity.setZy_printTime(DateUtil.getDateByTimeStampHM(dto.getZy_printTime()));
		entity.setRegDate(dto.getRegDate());
		if (dto.getCarClass() != null) entity.setCarClass(dto.getCarClass());
		entity.setCarType(dto.getCarType());
		if(dto.getCardType()!=null) entity.setCardType(dto.getCardType());
		entity.setCarName(dto.getCarName());
		entity.setBrandId(dto.getBrandId());
		entity.setChangeBody(dto.getChangeBody());
		entity.setCarStyleId(dto.getCarStyleId());
		entity.setMaterialImages6(dto.getMaterialImages6());
		entity.setMaterialImages7(dto.getMaterialImages7());
		entity.setMaterialImages8(dto.getMaterialImages8());
		entity.setMaterialImages9(dto.getMaterialImages9());
		entity.setMaterialImages10(dto.getMaterialImages10());
		entity.setModelCode(dto.getModelCode());
		entity.setVendorCode(dto.getVendorCode());
		entity.setVendorId(dto.getVendorId());
		entity.setIsMatch(dto.getIsMatch());
		if(dto.getCy_cardType()!=null)  entity.setCy_cardType(String.valueOf(dto.getCy_cardType()));
		entity.setNewOwnerZipCode(dto.getNewOwnerZipCode());
	    entity.setCarType(dto.getCarType());
		entity.setDb_printTime(DateUtil.getDateByTimeStampHM(dto.getDb_printTime()));
		entity.setZy_printTime(DateUtil.getDateByTimeStampHM(dto.getZy_printTime()));
		entity.setRegDate(dto.getRegDate());
		entity.setModelCode(dto.getModelCode());
		entity.setVendorCode(dto.getVendorCode());
		entity.setVendorId(dto.getVendorId());
		entity.setIsMatch(dto.getIsMatch());
		if (dto.getPrice() != null) 	entity.setPrice(dto.getPrice());
		entity.setNewOwnerZipCode(dto.getNewOwnerZipCode());
		entity.setCy_carType(dto.getCarType());
		entity.setCarType(dto.getCarType());
		entity.setDb_printTime(DateUtil.getDateByTimeStampHM(dto.getDb_printTime()));
		entity.setZy_printTime(DateUtil.getDateByTimeStampHM(dto.getZy_printTime()));
		entity.setRegDate(dto.getRegDate());
		if (dto.getCarClass() != null) entity.setCarClass(dto.getCarClass());
		entity.setCarType(dto.getCarType());
		if (dto.getMarketType() != null) entity.setMarketType(dto.getMarketType());
		if (dto.getStatus() != null) entity.setStatus(dto.getStatus());
		entity.setCarUse(dto.getCarUse());
		return entity;
	}
	/**
	 * 更新过户受理信息表
	 * 
	 * @return
	 * @throws TmsDaoException
	 */
	public void updateAcceptInfoAtAssess(TransferAcceptedInfo accept) throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);

		TransferAcceptedInfoDto dto = new TransferAcceptedInfoDto();
		dto.setSerial(accept.getSerial());
		dto.setVin(accept.getVin());
		dto.setMarketType(accept.getMarketType());
		dto.setPg_price(accept.getPg_price());// 评估价格
		dto.setUpdateUserId(accept.getUpdateUserId());
		dto.setStatus(accept.getStatus());
		dto.setPrice(accept.getPrice());
		dto.setCarOwner(accept.getCarOwner());
		uDao.updateAcceptInfoAtAssess(dto);

	}

	/**
	 * entity -- >Dto
	 * 
	 * @return
	 */
	private TransferAcceptedInfoDto setDtoFromEntity2(TransferAcceptedInfo entity, TransferAcceptedInfoDto dto) {

		dto.setId(entity.getId());
		dto.setMarketType(entity.getMarketType());
		dto.setPg_price(entity.getPg_price());
		dto.setVin(entity.getVin());
		dto.setLicensePlate(entity.getLicensePlate());
		dto.setStatus(entity.getStatus());
		dto.setAgentName(entity.getAgentName());

		dto.setAgentOwnerIdCardNo(entity.getAgentOwnerIdCardNo());
		dto.setAgentAddress(entity.getAgentAddress());
		dto.setMaterialImages2(entity.getMaterialImages2());
		dto.setMaterialImages1(entity.getMaterialImages1());
		dto.setMaterialImages3(entity.getMaterialImages3());
		dto.setMaterialImages4(entity.getMaterialImages4());
		dto.setMaterialImages5(entity.getMaterialImages5());
		dto.setOwnersGroupPhoto(entity.getOwnersGroupPhoto());
		dto.setAgentPhone(entity.getAgentPhone());
		dto.setAgentTime(entity.getAgentTime());
		//
		dto.setSerial(entity.getSerial());
		dto.setBasicCarId(entity.getBasicCarId());
		dto.setNewAgentAddress(entity.getNewAgentAddress());
		dto.setNewAgentName(entity.getNewAgentName());
		dto.setNewAgentPhone(entity.getNewAgentPhone());
		dto.setNewcarOwner(entity.getNewcarOwner());
		dto.setNewcarOwnerIdCardNo(newcarOwnerIdCardNo);
		dto.setNewOwnerAddress(entity.getNewOwnerAddress());
		dto.setNewOwnerOrgNo(entity.getNewOwnerOrgNo());
		dto.setNewOwnerType(entity.getNewOwnerType());
		dto.setPrice(entity.getPrice());
		dto.setGainType(entity.getGainType());
		dto.setTransferType(entity.getTransferType());
		dto.setTaxNo(entity.getTaxNo());
		dto.setMailAddress(entity.getMailAddress());
		dto.setMoveOutCity(entity.getMoveOutCity());
		dto.setMoveOutProvince(entity.getMoveOutProvince());
		dto.setCarMarketIn(entity.getCarMarketIn());
		dto.setNewOwnerPhone(entity.getNewOwnerPhone());
		dto.setZipCode(entity.getZipCode());

		dto.setLc_printNum(entity.getLc_printNum());
		dto.setLc_printUserId(entity.getLc_printUserId());

		dto.setSerial(entity.getSerial());
		dto.setLicensePlate(entity.getLicensePlate());
		if (entity.getCy_cardType() != null && !"".equals(entity.getCy_cardType())) {
			dto.setCardType(Integer.parseInt(entity.getCy_cardType()));
		} else {
			dto.setCardType(0);
		}
		dto.setBusinessType(entity.getBusinessType());
		dto.setVinNum(entity.getVinNum());
		dto.setEngineNum(entity.getEngineNum());
		dto.setTransferPrice(entity.getTransferPrice());
		dto.setExtendedPrice(entity.getExtendedPrice());
		dto.setDoubleTransferPrice(entity.getDoubleTransferPrice());

		dto.setTransNo(entity.getTransNo());
		dto.setTransMarket(entity.getTransMarket());
		if (entity.getGh_printTime() != null && !"".equals(entity.getGh_printTime())) {
			dto.setGh_printTime(DateUtil.getStringToTimeStamp1(entity.getGh_printTime() + ":00"));
		}

		// 少个字段
		dto.setCy_color(entity.getCy_color());
		dto.setCy_passenger(entity.getCy_passenger());
		dto.setCarType(entity.getCy_carType());
		dto.setPlateOrTireExterior(entity.getPlateOrTireExterior());
		dto.setTireIntact(entity.getTireIntact());

		dto.setSeatBelt(entity.getSeatBelt());
		dto.setNumberAxes(entity.getNumberAxes());
		dto.setTireSize(entity.getTireSize());
		dto.setLateralPortionOf(entity.getLateralPortionOf());
		dto.setReflectiveMark(entity.getReflectiveMark());

		dto.setFireExtinguisher(entity.getFireExtinguisher());
		dto.setDrivingRecord(entity.getDrivingRecord());
		dto.setSecurity(entity.getSecurity());
		dto.setExternalMarking(entity.getExternalMarking());
		dto.setSiren(entity.getSiren());

		dto.setSecurityTechnology(entity.getSecurityTechnology());
		dto.setCheckConclusion(entity.getCheckConclusion());
		dto.setInsertUserid(entity.getInsertUserid());
		dto.setInsertTime(entity.getInsertTime());

		dto.setPhoto_1(entity.getPhoto_1());
		dto.setPhoto_2(entity.getPhoto_2());
		dto.setPhoto_3(entity.getPhoto_3());
		dto.setPhoto_4(entity.getPhoto_4());

		dto.setMarketType(entity.getMarketType());

		dto.setStatus(entity.getStatus());

		dto.setBrandModel(entity.getBrandModel());
		dto.setCarOwner(entity.getCarOwner());
		dto.setCy_printNum(entity.getCy_printNum());
		dto.setRegistration(entity.getRegistration());
		dto.setTransfer(entity.getTransfer());
		dto.setTransferRegister(entity.getTransferRegister());
		dto.setChangesVacate(entity.getChangesVacate());
		dto.setChangeColor(entity.getChangeColor());
		dto.setConformityMark(entity.getConformityMark());
		dto.setChangeBody(entity.getChangeBody());
		dto.setChangeEngine(entity.getChangeEngine());
		dto.setChangeUsenature(entity.getChangeUsenature());
		dto.setRepeatVIN(entity.getRepeatVIN());
		dto.setRepeatEngineNum(entity.getRepeatEngineNum());
		dto.setChangeAllCar(entity.getChangeAllCar());
		dto.setApplyCertificate(entity.getApplyCertificate());
		dto.setReplacementCertificate(entity.getReplacementCertificate());
		dto.setMonitoringSales(entity.getMonitoringSales());
		dto.setOther(entity.getOther());
		dto.setBasicCarId(entity.getBasicCarId());
		dto.setMarketType(entity.getMarketType());
		dto.setOwnerType(entity.getOwnerType());// 车主类型
		dto.setOwnerOrgNo(entity.getOwnerOrgNo());
		dto.setPg_printNum(entity.getPg_printNum());
		dto.setDb_printNum(entity.getDb_printNum());

		dto.setUpdateTime(entity.getUpdateTime());
		dto.setUpdateUserId(entity.getUpdateUserId());

		dto.setNewOwnerTelPhone(entity.getNewOwnerTelPhone());
		dto.setExtendedPrice(entity.getExtendedPrice());
		dto.setTransNo(entity.getTransNo());
		dto.setTransMarket(entity.getTransMarket());
		dto.setAttnId(entity.getAttnId());

		dto.setZy_printnum(entity.getZy_printnum());
		dto.setZy_printUserId(entity.getZy_printUserId());
		if (entity.getZy_printTime() != null && !"".equals(entity.getZy_printTime())) {
			dto.setZy_printTime(DateUtil.getStringToTimeStamp1(entity.getZy_printTime() + ":00"));
		}
		dto.setCarOwnerIdCardNo(entity.getCarOwnerIdCardNo());
		dto.setOwnerOrgNo(entity.getOwnerOrgNo());
		dto.setOwnerPhone(entity.getOwnerPhone());
		dto.setOwnerAddress(entity.getOwnerAddress());
		dto.setCarOwner(entity.getCarOwner());
		dto.setGh_printnum(entity.getGh_printnum());
		dto.setGh_printUserId(entity.getGh_printUserId());
		dto.setXs_printnum(entity.getXs_printnum());
		dto.setXs_printUserId(entity.getXs_printUserId());
		if (entity.getXs_printTime() != null && !"".equals(entity.getXs_printTime())) {
			dto.setXs_printTime(DateUtil.getStringToTimeStamp1(entity.getXs_printTime() + ":00"));
		}
		dto.setSourceType(entity.getSourceType());
		dto.setCarClass(entity.getCarClass());
		dto.setRemark(entity.getRemark());
		if (entity.getPreTransfer() == 0) {
			dto.setPreTransfer(2);
		} else {
			dto.setPreTransfer(entity.getPreTransfer());
		}

		dto.setChangeTradeTicket(entity.getChangeTradeTicket());
		dto.setWaitForStatus(entity.getWaitForStatus());

		if (entity.getLc_printTime() != null && !"".equals(entity.getLc_printTime())) {
			dto.setLc_printTime(DateUtil.getStringToTimeStamp1(entity.getLc_printTime() + ":00"));
		}
		if (entity.getCy_printTime() != null && !"".equals(entity.getCy_printTime())) {
			dto.setCy_printTime(DateUtil.getStringToTimeStamp1(entity.getCy_printTime() + ":00"));
		}
		if (entity.getPg_printTime() != null && !"".equals(entity.getPg_printTime())) {
			dto.setPg_printTime(DateUtil.getStringToTimeStamp1(entity.getPg_printTime() + ":00"));
		}
		dto.setCy_printUserId(entity.getCy_printUserId());
		dto.setPicChangeNum(entity.getPicChangeNum());
		dto.setPicChangeUserId(entity.getPicChangeUserId());
		dto.setMemberId(entity.getMemberId());
		dto.setAttachMemberId(entity.getAttachMemberId());
		dto.setCheckFileStatus(entity.getCheckFileStatus());
		dto.setNewcarOwnerIdCardNo(entity.getNewcarOwnerIdCardNo());
		// #104 start
		dto.setVendorId(entity.getVendorId());
		dto.setBrandId(entity.getBrandId());
		dto.setCarStyleId(entity.getCarStyleId());
		dto.setCarName(entity.getCarName());
		dto.setIsMatch(entity.getIsMatch());
		// #104 e n d
		return dto;
	}

	/**
	 * entity -- >Dto
	 * 
	 * @return
	 */
	private TransferAcceptedInfoDto setDtoFromEntity(TransferAcceptedInfo entity, TransferAcceptedInfoDto dto) {

		dto.setId(entity.getId());
		dto.setMarketType(entity.getMarketType());
		dto.setPg_price(entity.getPg_price());
		dto.setVin(entity.getVin());
		dto.setLicensePlate(entity.getLicensePlate());
		dto.setStatus(entity.getStatus());
		dto.setAgentName(entity.getAgentName());

		dto.setAgentOwnerIdCardNo(entity.getAgentOwnerIdCardNo());
		dto.setAgentAddress(entity.getAgentAddress());
		dto.setMaterialImages2(entity.getMaterialImages2());
		dto.setMaterialImages1(entity.getMaterialImages1());
		dto.setMaterialImages3(entity.getMaterialImages3());
		dto.setMaterialImages4(entity.getMaterialImages4());
		dto.setMaterialImages5(entity.getMaterialImages5());
		dto.setOwnersGroupPhoto(entity.getOwnersGroupPhoto());
		dto.setAgentPhone(entity.getAgentPhone());
		dto.setAgentTime(entity.getAgentTime());
		//
		dto.setSerial(entity.getSerial());
		dto.setBasicCarId(entity.getBasicCarId());
		dto.setNewAgentAddress(entity.getNewAgentAddress());
		dto.setNewAgentName(entity.getNewAgentName());
		dto.setNewAgentOwnerIdCardNo(entity.getNewAgentOwnerIdCardNo());
		dto.setNewAgentPhone(entity.getNewAgentPhone());
		dto.setNewcarOwner(entity.getNewcarOwner());
		dto.setNewOwnerAddress(entity.getNewOwnerAddress());
		dto.setNewOwnerOrgNo(entity.getNewOwnerOrgNo());
		dto.setNewOwnerType(entity.getNewOwnerType());
		dto.setPrice(entity.getPrice());
		dto.setGainType(entity.getGainType());
		dto.setTransferType(entity.getTransferType());
		dto.setTaxNo(entity.getTaxNo());
		dto.setMailAddress(entity.getMailAddress());
		dto.setMoveOutCity(entity.getMoveOutCity());
		dto.setMoveOutProvince(entity.getMoveOutProvince());
		dto.setCarMarketIn(entity.getCarMarketIn());
		dto.setNewOwnerPhone(entity.getNewOwnerPhone());
		dto.setZipCode(entity.getZipCode());
//		dto.setCardType(Integer.parseInt(entity.getCy_cardType()));
		dto.setCarOwner(entity.getCarOwner());
		dto.setOwnerAddress(entity.getOwnerAddress());
		dto.setOwnerPhone(entity.getOwnerPhone());
		dto.setLc_printNum(entity.getLc_printNum());
		dto.setLc_printUserId(entity.getLc_printUserId());

		dto.setSerial(entity.getSerial());
		dto.setLicensePlate(entity.getLicensePlate());
		if (entity.getCy_cardType() != null && !"".equals(entity.getCy_cardType())) {
			dto.setCardType(Integer.parseInt(entity.getCy_cardType()));
		} else {
			dto.setCardType(0);
		}
		dto.setBusinessType(entity.getBusinessType());
		dto.setVinNum(entity.getVinNum());
		dto.setEngineNum(entity.getEngineNum());
		dto.setTransferPrice(entity.getTransferPrice());
		dto.setExtendedPrice(entity.getExtendedPrice());
		dto.setDoubleTransferPrice(entity.getDoubleTransferPrice());
		dto.setCarType(entity.getCy_carType());
		dto.setTransNo(entity.getTransNo());
		dto.setTransMarket(entity.getTransMarket());
		if (entity.getGh_printTime() != null && !"".equals(entity.getGh_printTime())) {
			dto.setGh_printTime(DateUtil.getStringToTimeStamp1(entity.getGh_printTime() + ":00"));
		}

		// 少个字段
		dto.setCy_color(entity.getCy_color());
		dto.setCy_passenger(entity.getCy_passenger());
		dto.setCarType(entity.getCy_carType());
		dto.setPlateOrTireExterior(entity.getPlateOrTireExterior());
		dto.setTireIntact(entity.getTireIntact());

		dto.setSeatBelt(entity.getSeatBelt());
		dto.setNumberAxes(entity.getNumberAxes());
		dto.setTireSize(entity.getTireSize());
		dto.setLateralPortionOf(entity.getLateralPortionOf());
		dto.setReflectiveMark(entity.getReflectiveMark());

		dto.setFireExtinguisher(entity.getFireExtinguisher());
		dto.setDrivingRecord(entity.getDrivingRecord());
		dto.setSecurity(entity.getSecurity());
		dto.setExternalMarking(entity.getExternalMarking());
		dto.setSiren(entity.getSiren());

		dto.setSecurityTechnology(entity.getSecurityTechnology());
		dto.setCheckConclusion(entity.getCheckConclusion());
		dto.setInsertUserid(entity.getInsertUserid());
		dto.setInsertTime(entity.getInsertTime());

		dto.setPhoto_1(entity.getPhoto_1());
		dto.setPhoto_2(entity.getPhoto_2());
		dto.setPhoto_3(entity.getPhoto_3());
		dto.setPhoto_4(entity.getPhoto_4());

		dto.setMarketType(entity.getMarketType());

		dto.setStatus(entity.getStatus());

		dto.setBrandModel(entity.getBrandModel());
		dto.setCarOwner(entity.getCarOwner());
		dto.setCy_printNum(entity.getCy_printNum());
		dto.setRegistration(entity.getRegistration());
		dto.setTransfer(entity.getTransfer());
		dto.setTransferRegister(entity.getTransferRegister());
		dto.setChangesVacate(entity.getChangesVacate());
		dto.setChangeColor(entity.getChangeColor());
		dto.setConformityMark(entity.getConformityMark());
		dto.setChangeBody(entity.getChangeBody());
		dto.setChangeEngine(entity.getChangeEngine());
		dto.setChangeUsenature(entity.getChangeUsenature());
		dto.setRepeatVIN(entity.getRepeatVIN());
		dto.setRepeatEngineNum(entity.getRepeatEngineNum());
		dto.setChangeAllCar(entity.getChangeAllCar());
		dto.setApplyCertificate(entity.getApplyCertificate());
		dto.setReplacementCertificate(entity.getReplacementCertificate());
		dto.setMonitoringSales(entity.getMonitoringSales());
		dto.setOther(entity.getOther());
		dto.setBasicCarId(entity.getBasicCarId());
		dto.setMarketType(entity.getMarketType());
		dto.setOwnerType(entity.getOwnerType());// 车主类型
		dto.setOwnerOrgNo(entity.getOwnerOrgNo());
		dto.setPg_printNum(entity.getPg_printNum());
		dto.setDb_printNum(entity.getDb_printNum());

		dto.setUpdateTime(entity.getUpdateTime());
		dto.setUpdateUserId(entity.getUpdateUserId());

		dto.setNewOwnerTelPhone(entity.getNewOwnerTelPhone());
		dto.setExtendedPrice(entity.getExtendedPrice());
		dto.setTransNo(entity.getTransNo());
		dto.setTransMarket(entity.getTransMarket());
		dto.setAttnId(entity.getAttnId());

		dto.setZy_printnum(entity.getZy_printnum());
		dto.setZy_printUserId(entity.getZy_printUserId());
		if (entity.getZy_printTime() != null && !"".equals(entity.getZy_printTime())) {
			dto.setZy_printTime(DateUtil.getStringToTimeStamp1(entity.getZy_printTime() + ":00"));
		}
		dto.setCarOwnerIdCardNo(entity.getCarOwnerIdCardNo());
		dto.setOwnerOrgNo(entity.getOwnerOrgNo());
		dto.setOwnerPhone(entity.getOwnerPhone());
		dto.setOwnerAddress(entity.getOwnerAddress());
		dto.setCarOwner(entity.getCarOwner());
		dto.setGh_printnum(entity.getGh_printnum());
		dto.setGh_printUserId(entity.getGh_printUserId());
		dto.setXs_printnum(entity.getXs_printnum());
		dto.setXs_printUserId(entity.getXs_printUserId());
		if (entity.getXs_printTime() != null && !"".equals(entity.getXs_printTime())) {
			dto.setXs_printTime(DateUtil.getStringToTimeStamp1(entity.getXs_printTime() + ":00"));
		}
		dto.setSourceType(entity.getSourceType());
		dto.setCarClass(entity.getCarClass());
		dto.setRemark(entity.getRemark());
		if (entity.getPreTransfer() == 0) {
			dto.setPreTransfer(2);
		} else {
			dto.setPreTransfer(entity.getPreTransfer());
		}

		dto.setChangeTradeTicket(entity.getChangeTradeTicket());
		dto.setWaitForStatus(entity.getWaitForStatus());

		if (entity.getLc_printTime() != null && !"".equals(entity.getLc_printTime())) {
			dto.setLc_printTime(DateUtil.getStringToTimeStamp1(entity.getLc_printTime() + ":00"));
		}
		if (entity.getCy_printTime() != null && !"".equals(entity.getCy_printTime())) {
			dto.setCy_printTime(DateUtil.getStringToTimeStamp1(entity.getCy_printTime() + ":00"));
		}
		if (entity.getPg_printTime() != null && !"".equals(entity.getPg_printTime())) {
			dto.setPg_printTime(DateUtil.getStringToTimeStamp1(entity.getPg_printTime() + ":00"));
		}
		dto.setCy_printUserId(entity.getCy_printUserId());
		dto.setPicChangeNum(entity.getPicChangeNum());
		dto.setPicChangeUserId(entity.getPicChangeUserId());
		dto.setMemberId(entity.getMemberId());
		dto.setAttachMemberId(entity.getAttachMemberId());
		dto.setCheckFileStatus(entity.getCheckFileStatus());
		dto.setNewcarOwnerIdCardNo(entity.getNewcarOwnerIdCardNo());
		dto.setNewLicensePlate(entity.getNewLicensePlate());
		return dto;
	}

	/**
	 * 高级搜索中的过户信息修改
	 * 
	 * @param entity
	 * @param dto
	 * @return
	 */
	private TransferAcceptedInfoDto entityToDtoBySerial(TransferAcceptedInfo entity, TransferAcceptedInfoDto dto) {
		//
		dto.setSerial(entity.getSerial());
		dto.setBasicCarId(entity.getBasicCarId());
		dto.setNewAgentAddress(entity.getNewAgentAddress());
		dto.setNewAgentName(entity.getNewAgentName());
		dto.setNewAgentOwnerIdCardNo(entity.getNewAgentOwnerIdCardNo());
		dto.setNewAgentPhone(entity.getNewAgentPhone());
		dto.setNewcarOwner(entity.getNewcarOwner());
		dto.setNewcarOwnerIdCardNo(entity.getNewcarOwnerIdCardNo());
		dto.setNewOwnerAddress(entity.getNewOwnerAddress());
		dto.setNewOwnerOrgNo(entity.getNewOwnerOrgNo());
		dto.setNewOwnerType(entity.getNewOwnerType());
		dto.setNewOwnerPhone(entity.getNewOwnerPhone());
		dto.setPrice(entity.getPrice());
		dto.setGainType(entity.getGainType());
		dto.setTransferType(entity.getTransferType());
		dto.setTaxNo(entity.getTaxNo());
		dto.setMailAddress(entity.getMailAddress());
		dto.setMoveOutCity(entity.getMoveOutCity());
		dto.setMoveOutProvince(entity.getMoveOutProvince());
		dto.setCarMarketIn(entity.getCarMarketIn());
		dto.setNewOwnerTelPhone(entity.getNewOwnerTelPhone());
		dto.setZipCode(entity.getZipCode());
		dto.setUpdateUserId(entity.getUpdateUserId());
		if (entity.getPreTransfer() == 0) {
			dto.setPreTransfer(2);
		} else {
			dto.setPreTransfer(entity.getPreTransfer());
		}
		dto.setConformityMark(entity.getConformityMark());

		return dto;
	}

	/**
	 * 
	 * 待办受理更新过户信息表
	 * 
	 * @return
	 * @throws TmsDaoException
	 */
	public void updateAcceptInfoAtProxy(TransferAcceptedInfo entity, String sysPath) throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		TransferAcceptedInfoDto dto = new TransferAcceptedInfoDto();
		File outFile = null;
		File inFile = null;
		sysPath = sysPath.replace("/tmsweb", TmsConstants.BLANK);
		if (entity.getOwnersGroupPhoto() != null && !"".equals(entity.getOwnersGroupPhoto())) {
			if (entity.getOwnersGroupPhoto().indexOf("carImageTmp") != -1) {
				inFile = new File(sysPath + entity.getOwnersGroupPhoto());
				outFile = new File(ImageUtils.getImageDirectoryPath(
						Registry.getConfig(TmsConstants.UPLOAD_ZL_IMAGE_KEY) + entity.getSerial() + "/")
						+ entity.getSerial() + "_6.jpg");
				CopyFile.copy(inFile, outFile);
				//
				entity.setOwnersGroupPhoto(imgPath(entity.getOwnersGroupPhoto(), entity.getSerial(), "6"));
			}
		}

		dto = setDtoFromEntity(entity, dto);
		if (entity.getPreTransfer() == 1) dto.setPreTransfer(1);
		dto.setWaitForStatus(entity.getWaitForStatus());
		dto.setOwnerType(entity.getOwnerType());
		uDao.updateAcceptInfoAtProxy(dto);
	}

	/**
	 * 
	 * 待办受理更新过户信息表
	 * 
	 * @return
	 * @throws TmsDaoException
	 */
	public void updateAcceptInfoAtAdvance(TransferAcceptedInfo entity, String sysPath) throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);

		TransferAcceptedInfoDto dto = new TransferAcceptedInfoDto();

		// 将image图片信息放到服务器上
		// 对每个path进行处理 。。。【photo就是imgpath
		File outFile = null;
		File inFile = null;

		sysPath = sysPath.replace("/tmsweb", TmsConstants.BLANK);

		if (entity.getOwnersGroupPhoto() != null && !"".equals(entity.getOwnersGroupPhoto())) {
			if (entity.getOwnersGroupPhoto().indexOf("carImageTmp") != -1) {
				inFile = new File(sysPath + entity.getOwnersGroupPhoto());
				outFile = new File(ImageUtils.getImageDirectoryPath(
						Registry.getConfig(TmsConstants.UPLOAD_ZL_IMAGE_KEY) + entity.getSerial() + "/")
						+ entity.getSerial() + "_6.jpg");
				CopyFile.copy(inFile, outFile);
				//
				entity.setOwnersGroupPhoto(imgPath(entity.getOwnersGroupPhoto(), entity.getSerial(), "6"));
			}
		}

		dto = setDtoFromEntity(entity, dto);
		dto.setPreTransfer(1);
		dto.setWaitForStatus(entity.getWaitForStatus());
		dto.setOwnerType(entity.getOwnerType());

		uDao.updateAcceptInfoAtAdvance(dto);

	}

	/**
	 * 处理存入数据库中的图片路径
	 */
	private String imgPath(String path, String serial, String imgKey) {

		return ImageUtils.getImageUrl(
				Registry.getConfig(TmsConstants.UPLOAD_ZL_IMAGE_KEY) + serial + "/" + serial + "_" + imgKey + ".jpg");
	}

	/**
	 * 根据VIN码查询上次评估价格和上次评估时间
	 * 
	 * @return
	 * @throws TmsDaoException
	 */
	public TransferAcceptedInfo searchLastAssessInfoByVin(String vin) throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);

		List<TransferAcceptedInfoDto> dtoList = uDao.searchLastAssessInfoByVin(vin);

		TransferAcceptedInfo entity = new TransferAcceptedInfo();

		if (dtoList.size() > 0) {
			TransferAcceptedInfoDto dto = dtoList.get(0);
			entity.setPg_price(dto.getPg_price());
			entity.setPg_time(dto.getPg_time());
			entity.setSerial(dto.getSerial());
		} else {

			return null;
		}

		return entity;
	}

	/**
	 * PAD查验数据更新过户信息表
	 * 
	 * @return
	 * @throws TmsDaoException
	 */
	public void updateAcceptInfoAtPad(TransferAcceptedInfo entity) throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);

		// 将entity数据set到dto中进行更新
		TransferAcceptedInfoDto dto = new TransferAcceptedInfoDto();
		dto = setDtoFromEntity(entity, dto);

		uDao.updateAcceptInfoAtPad(dto);
	}

	/**
	 * PAD查验数据插入过户信息表
	 * 
	 * @return
	 */
	public void insertCarInfoAtPad(TransferAcceptedInfo entity) throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);

		// 将entity数据set到dto中进行更新
		TransferAcceptedInfoDto dto = new TransferAcceptedInfoDto();
		dto = setDtoFromEntity(entity, dto);

		uDao.insertCarInfoAtPad(dto);
	}

	/**
	 * 长海县车车辆插入
	 * 
	 * @return
	 */
	public void insertCarInfoAtChx(TransferAcceptedInfo entity) throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);

		// 将entity数据set到dto中进行更新
		TransferAcceptedInfoDto dto = new TransferAcceptedInfoDto();
		dto = setDtoFromEntity(entity, dto);

		uDao.insertCarInfoAtChx(dto);
	}

	/**
	 * 根据流水号或车牌号码查询过户信息
	 * 
	 * @return
	 * @throws TmsDaoException
	 */
	public TransferAcceptedInfo searchAcceptInfoToPad(String serial, String licenseplate) throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);

		TransferAcceptedInfoDto dto = new TransferAcceptedInfoDto();

		dto = uDao.searchAcceptInfoToPad(serial, licenseplate);

		TransferAcceptedInfo entity = new TransferAcceptedInfo();

		if (dto != null) {
			// dto---》entity
			entity = setEntityFromDto(entity, dto);
			entity.setInsertTimeS(DateUtil.getTimeByTimeStamp1(dto.getInsertTime()));
			return entity;
		}

		return null;
	}

	/**
	 * 根据流水号载入打印次数,车牌号码，车主姓名，VIN码
	 * 
	 * @param serial
	 * @return
	 * @throws TmsDaoException
	 */
	public TransferAcceptedInfo findPirntNumBySerial(String serial) throws TmsDaoException {
		TransferAcceptedInfo entity = new TransferAcceptedInfo();
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		TransferAcceptedInfoDto dto = new TransferAcceptedInfoDto();
		dto = uDao.findPrintNum(serial);
		entity = setEntityFromDto(entity, dto);
		return entity;
	}

	/**
	 * 根据过户流水号更新过户信息表（打印流程表，更新打印次数）
	 * 
	 * @param serial
	 * @throws TmsDaoException
	 */
	public void updateTransferLcPrintNumBySerial(TransferAcceptedInfo entity) throws TmsDaoException {
		TransferAcceptedInfoDto dto = new TransferAcceptedInfoDto();
		dto.setLc_printNum(entity.getLc_printNum());
		dto.setCy_printNum(entity.getCy_printNum());
		dto.setSerial(entity.getSerial());
		dto.setUpdateUserId(entity.getUpdateUserId());
		dto.setCarOwner(entity.getCarOwner());
		dto.setOwnerType(entity.getOwnerType());
		dto.setStatus(entity.getStatus());
		dto.setSourceType(entity.getSourceType());
		dto.setMemberId(entity.getMemberId());
		dto.setAttnId(entity.getAttnId());
		dto.setLicensePlate(entity.getLicensePlate());
		dto.setVin(entity.getVin());
		dto.setLicensePlateCol(entity.getLicensePlateCol());
		if (entity.getCy_cardType() != null && !"".equals(entity.getCy_cardType())) {
			dto.setCardType(Integer.parseInt(entity.getCy_cardType()));
		} else {
			dto.setCardType(0);
		}
		dto.setTransferPrice(entity.getTransferPrice());
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		uDao.updateTransferLcPrintNum(dto);
	}

	/**
	 * 更新打印临证
	 * 
	 * @param entity
	 * @throws TmsDaoException
	 */
	public void updateTransferLzPrintNumBySerial(TransferAcceptedInfo entity) throws TmsDaoException {
		TransferAcceptedInfoDto dto = new TransferAcceptedInfoDto();
		dto.setLz_printnum(entity.getLz_printnum());
		dto.setSerial(entity.getSerial());
		dto.setLz_printUserId(entity.getLz_printUserId());
		dto.setUpdateUserId(entity.getLz_printUserId());
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		uDao.updateTransferLzPrintNum(dto);
	}

	/**
	 * 更新打印行驶证
	 * 
	 * @param entity
	 * @throws TmsDaoException
	 */
	public void updateTransferXsPrintNum(TransferAcceptedInfo entity) throws TmsDaoException {
		TransferAcceptedInfoDto dto = new TransferAcceptedInfoDto();
		dto.setXs_printnum(entity.getXs_printnum());
		dto.setSerial(entity.getSerial());
		dto.setXs_printUserId(entity.getXs_printUserId());
		dto.setUpdateUserId(entity.getXs_printUserId());
		dto.setStatus(entity.getStatus());
		dto.setNewLicensePlate(entity.getNewLicensePlate());
		dto.setReapplyCert(entity.getReapplyCert());
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		uDao.updateTransferXsPrintNum(dto);
	}

	/**
	 * 更新查验信息
	 * 
	 * @throws TmsDaoException
	 * 
	 */
	public void updateTransferCyPrintNumBySerial(TransferAcceptedInfo entity) throws TmsDaoException {
		TransferAcceptedInfoDto dto = new TransferAcceptedInfoDto();
		dto.setCy_printNum(entity.getCy_printNum());
		dto.setSerial(entity.getSerial());
		dto.setUpdateUserId(entity.getUpdateUserId());
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		uDao.updateTransferCyPrintNumBySerial(dto);
	}

	/**
	 * 库存打查验表，更新查验信息
	 * 
	 * @param entity
	 * @throws TmsDaoException
	 */
	public void updateMarketCyPrintNum(TransferAcceptedInfo entity) throws TmsDaoException {
		TransferAcceptedInfoDto dto = new TransferAcceptedInfoDto();
		dto.setCy_printNum(entity.getCy_printNum());
		dto.setSerial(entity.getSerial());
		dto.setUpdateUserId(entity.getUpdateUserId());
		dto.setCarOwner(entity.getCarOwner());
		dto.setCardType(Integer.parseInt(entity.getCy_cardType()));
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		uDao.updateMarketCyPrintNum(dto);
	}

	/**
	 * 查询过户信息
	 * 
	 * @return
	 * @throws TmsDaoException
	 */
	public TransferAcceptedInfo getAcceptInfoBySerialAndCarLicense(String serial, String carLicense, int status)
			throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);

		TransferAcceptedInfo entity = new TransferAcceptedInfo();

		TransferAcceptedInfoDto dto = uDao.getAcceptInfoBySerialAndCarLicense(serial, carLicense, status);

		if (dto != null) {
			entity = setEntityFromDto(entity, dto);
			entity.setInsertTimeS(dto.getInsertTimeS());
			return entity;
		}
		return null;
	}

	/**
	 * 根据车辆ID更新过户状态
	 * 
	 * @return
	 * @throws TmsDaoException
	 */
	public void updateMemberIdBySerial(String serial, String memberId, String attnId) throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		uDao.updateAcceptMemberIdBySerial(serial, memberId, attnId);
	}

	/**
	 * 根据车辆ID更新过户状态
	 * 
	 * @return
	 * @throws TmsDaoException
	 */
	public void updateAcceptStatusBySerial(TransferAcceptedInfo entity) throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);

		TransferAcceptedInfoDto dto = new TransferAcceptedInfoDto();

		dto = setDtoFromEntity(entity, dto);
		dto.setSerial(entity.getSerial());
		dto.setStatus(entity.getStatus());
		dto.setChangeTradeTicket(entity.getChangeTradeTicket());
		dto.setUpdateUserId(entity.getUpdateUserId());
		dto.setCheckUserid(entity.getCheckUserid());
		dto.setTransferPrice(entity.getTransferPrice());
		dto.setWaitForStatus(entity.getWaitForStatus());
		dto.setCheckFileStatus(entity.getCheckFileStatus());
		uDao.updateAcceptStatusBySerial(dto);
	}

	/**
	 * 更新审档开始时间和结束时间
	 * 
	 * @param entity
	 * @throws TmsDaoException
	 */
	public void updateCFileTime(TransferAcceptedInfo entity) throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		TransferAcceptedInfoDto dto = new TransferAcceptedInfoDto();
		dto.setSerial(entity.getSerial());
		dto.setCheckFileTime(entity.getCheckFileTime());
		uDao.updateCfileTime(dto);
	}

	/**
	 * 根据车辆ID更新过户状态
	 * 
	 * @return
	 * @throws TmsDaoException
	 */
	public void updateAcceptStatusAloneBySerial(TransferAcceptedInfo entity) throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		TransferAcceptedInfoDto dto = new TransferAcceptedInfoDto();
		dto.setSerial(entity.getSerial());
		dto.setStatus(entity.getStatus());

		uDao.updateAcceptStatusAloneBySerial(dto);
	}

	/***
	 * 根据流水号查询过户信息
	 * 
	 * @throws TmsDaoException
	 */

	public TransferAcceptedInfo findTransStatusBySerial(String serial) throws TmsDaoException {
		// TODO Auto-generated method stub
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		TransferAcceptedInfoDto dto = new TransferAcceptedInfoDto();
		dto = uDao.findTransStatusBySerial(serial);
		TransferAcceptedInfo entity = new TransferAcceptedInfo();
		if (dto != null) {
			entity = setEntityFromDto(entity, dto);
			return entity;
		}

		return null;

	}

	/***
	 * 更新过户状态
	 * 
	 * @param serial
	 * @param upStatus
	 * @throws TmsDaoException
	 */
	public void updateTransStatusBySerial(TransferAcceptedInfo entity) throws TmsDaoException {
		// TODO Auto-generated method stub
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		TransferAcceptedInfoDto dto = new TransferAcceptedInfoDto();
		dto.setStatus(entity.getStatus());
		dto.setSerial(entity.getSerial());
		dto.setUpdateUserId(entity.getUpdateUserId());
		dto.setLc_printNum(entity.getLc_printNum());
		dto.setLc_printUserId(entity.getUpdateUserId());
		dto.setTransferPrice(entity.getTransferPrice());
		uDao.updateTransStatusBySerial(dto);
	}

	/**
	 * 更新待办过期/超期费
	 */
	public void updateTransExtendPriceByEntity(TransferAcceptedInfo entity) throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		TransferAcceptedInfoDto dto = new TransferAcceptedInfoDto();
		dto.setSerial(entity.getSerial());
		dto.setStatus(entity.getStatus());
		dto.setExtendedPrice(entity.getExtendedPrice());
		dto.setUpdateUserId(entity.getUpdateUserId());
		dto.setWaitForStatus(entity.getWaitForStatus());
		uDao.updateTransExtendPriceByEntity(dto);
	}

	/**
	 * 更新二次过户信息 二次过户费和状态
	 * 
	 * @throws TmsDaoException
	 */
	public void updateTwiceTransPriceBySerial(TransferAcceptedInfo entity) throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		TransferAcceptedInfoDto dto = new TransferAcceptedInfoDto();
		dto = setDtoFromEntity(entity, dto);
		uDao.updateTwiceTransPriceBySerial(dto);
	}

	/**
	 * 立体停车场入库
	 * 
	 * @param entity
	 * @throws TmsDaoException
	 */
	public void insertEasyCar(TransferAcceptedInfo entity) throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		TransferAcceptedInfoDto dto = new TransferAcceptedInfoDto();

		dto.setSerial(entity.getSerial());
		dto.setMarketType(1);
		dto.setBasicCarId(entity.getBasicCarId());
		dto.setLicensePlate(entity.getLicensePlate());
		if (!StringUtil.isNullOrBlank(entity.getVin())) {
			dto.setVin(entity.getVin());
		}
		dto.setSourceType(1);
		dto.setStatus(0);
		dto.setInsertUserid(entity.getInsertUserid());
		dto.setUpdateUserId(entity.getUpdateUserId());
		dto.setCarOwner(entity.getCarOwner());
		dto.setCarOwnerIdCardNo(entity.getCarOwnerIdCardNo());
		dto.setOwnerPhone(entity.getOwnerPhone());
		dto.setOwnerType(entity.getOwnerType());
		dto.setOwnerAddress(entity.getOwnerAddress());
		dto.setOwnerOrgNo(entity.getOwnerOrgNo());
		dto.setCarClass(2);
		dto.setPhoto_1(entity.getPhoto_1());
		dto.setPhoto_2(entity.getPhoto_2());
		dto.setPhoto_3(entity.getPhoto_3());
		dto.setPhoto_4(entity.getPhoto_4());
		if (!StringUtil.isNullOrBlank(entity.getCy_cardType())) {
			dto.setCardType(Integer.parseInt(entity.getCy_cardType()));
		}
		dto.setVinNum("1");
		dto.setEngineNum("1");
		dto.setBrandModel("1");
		dto.setPlateOrTireExterior("1");
		dto.setTireIntact("1");
		dto.setSeatBelt("1");
		dto.setAttnId(entity.getAttnId());
		dto.setWaitForStatus(0);// modify by huangwei
		dto.setMemberId(entity.getMemberId());// modify by huangheli
		uDao.insertEasyCar(dto);

	}

	/**
	 * 微信接口入库车辆入录
	 * 
	 * @param entity
	 * @throws TmsDaoException
	 */
	public void insertCarWithWeiChat(TransferAcceptedInfo entity) throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		TransferAcceptedInfoDto dto = new TransferAcceptedInfoDto();

		dto.setSerial(entity.getSerial());
		dto.setMarketType(entity.getMarketType());
		dto.setBasicCarId(entity.getBasicCarId());
		dto.setLicensePlate(entity.getLicensePlate());
		dto.setSourceType(entity.getSourceType());
		dto.setStatus(entity.getStatus());
		dto.setCarClass(entity.getCarClass());
		dto.setMemberId(entity.getMemberId());
		dto.setAttnId(entity.getAttnId());
		dto.setPhoto_1(entity.getPhoto_1());
		dto.setInsertUserid(entity.getInsertUserid());
		dto.setUpdateUserId(entity.getUpdateUserId());

		uDao.insertCarWithWeiChat(dto);

	}

	/**
	 * 过户业务基本信息入录
	 * 
	 * @param entity
	 * @throws TmsDaoException
	 */
	public void insertCarResumeInfo(TransferAcceptedInfo entity) throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		TransferAcceptedInfoDto dto = new TransferAcceptedInfoDto();

		dto.setSerial(entity.getSerial());
		dto.setMarketType(entity.getMarketType());
		dto.setBasicCarId(entity.getBasicCarId());
		dto.setLicensePlate(entity.getLicensePlate());
		dto.setSourceType(entity.getSourceType());
		dto.setStatus(entity.getStatus());
		dto.setCarClass(entity.getCarClass());
		dto.setMemberId(entity.getMemberId());
		dto.setInsertUserid(entity.getInsertUserid());
		dto.setUpdateUserId(entity.getUpdateUserId());

		uDao.insertCarResumeInfo(dto);

	}

	/**
	 * 更新车辆库存类型
	 * 
	 * @param entity
	 * @throws TmsDaoException
	 */
	public void updateMarketTypeBySerial(TransferAcceptedInfo entity) throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		TransferAcceptedInfoDto dto = new TransferAcceptedInfoDto();
		dto.setSerial(entity.getSerial());
		dto.setBasicCarId(entity.getBasicCarId());
		dto.setMarketType(entity.getMarketType());
		dto.setUpdateUserId(entity.getUpdateUserId());

		dto.setLicensePlate(entity.getLicensePlate());
		dto.setCarOwner(entity.getCarOwner());
		dto.setCarOwnerIdCardNo(entity.getCarOwnerIdCardNo());
		dto.setOwnerAddress(entity.getOwnerAddress());
		dto.setOwnerOrgNo(entity.getOwnerOrgNo());
		dto.setOwnerPhone(entity.getOwnerPhone());
		dto.setOwnerType(entity.getOwnerType());
		dto.setPrice(entity.getPrice());
		dto.setVin(entity.getVin());
		uDao.updateMarketTypeBySerial(dto);
	}

	
	public void updateMarketTypeBySerial(TransferAcceptedInfoDto dto) throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		uDao.updateTransBySerial(dto);
	}
	/**
	 * 微信接口更新过户信息表
	 * 
	 * @param entity
	 * @throws TmsDaoException
	 */
	public void updateAcceptInfoByWeiChart(TransferAcceptedInfo entity) throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		TransferAcceptedInfoDto dto = new TransferAcceptedInfoDto();
		dto.setSerial(entity.getSerial());
		dto.setUpdateUserId(entity.getUpdateUserId());
		dto.setStatus(entity.getStatus());
		dto.setCardType(Integer.parseInt(entity.getCy_cardType()));
		dto.setPhoto_1(entity.getPhoto_1());
		dto.setAttnId(entity.getAttnId());

		uDao.updateAcceptInfoByWeiChart(dto);
	}

	/**
	 * 更新过户信息
	 * 
	 * @param entity
	 * @param sysPath
	 * @param updateMatch
	 * @throws TmsDaoException
	 */
	public void updateAcceptInfoAtGh(TransferAcceptedInfo entity, String sysPath, boolean updateMatch)
			throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		TransferAcceptedInfoDto dto = new TransferAcceptedInfoDto();

		File outFile = null;
		File inFile = null;

		sysPath = sysPath.replace("/tmsweb", TmsConstants.BLANK);

		if (entity.getOwnersGroupPhoto() != null && !"".equals(entity.getOwnersGroupPhoto())) {
			if (entity.getOwnersGroupPhoto().indexOf("carImageTmp") != -1) {
				inFile = new File(sysPath + entity.getOwnersGroupPhoto());
				outFile = new File(ImageUtils.getImageDirectoryPath(
						Registry.getConfig(TmsConstants.UPLOAD_ZL_IMAGE_KEY) + entity.getSerial() + "/")
						+ entity.getSerial() + "_6.jpg");
				CopyFile.copy(inFile, outFile);
			}
			//
			entity.setOwnersGroupPhoto(imgPath(entity.getOwnersGroupPhoto(), entity.getSerial(), "6"));
		}
		dto = setDtoFromEntity2(entity, dto);
		uDao.updateAcceptInfoAtGh(dto, updateMatch);
	}

	/**
	 * 更新打印交易票信息
	 * 
	 * @param entity
	 * @throws TmsDaoException
	 */
	public void updateAcceptInfoAtJYP(TransferAcceptedInfo entity) throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		TransferAcceptedInfoDto dto = new TransferAcceptedInfoDto();
		dto = setDtoFromEntity(entity, dto);
		if (entity.getChangeTradeTicket() == 1) {
			dto.setChangeTradeTicket(1);
		} else {
			dto.setChangeTradeTicket(2);
		}

		uDao.updateAcceptInfoAtJYP(dto);
	}

	/**
	 * 更新图片信息
	 * 
	 * @return
	 * @throws TmsDaoException
	 */
	public void updatePic(TransferAcceptedInfo entity) throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		TransferAcceptedInfoDto dto = new TransferAcceptedInfoDto();
		dto.setMaterialImages1(entity.getMaterialImages1());
		dto.setMaterialImages2(entity.getMaterialImages2());
		dto.setMaterialImages3(entity.getMaterialImages3());
		dto.setMaterialImages4(entity.getMaterialImages4());
		dto.setMaterialImages5(entity.getMaterialImages5());
		dto.setSerial(entity.getSerial());
		dto.setOwnersGroupPhoto(entity.getOwnersGroupPhoto());
		uDao.updatePic(dto);
	}
 
	/**
	 * 根据vin码查询过户信息
	 * 
	 * @return
	 * @throws TmsDaoException
	 */
	public TransferAcceptedInfo findAcceptInfoByVin(String vin) throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		TransferAcceptedInfoDto dto = uDao.getAcceptInfoByVin(vin);
		if (dto == null)
			return null;
		TransferAcceptedInfo entity = new TransferAcceptedInfo();
		entity.setLicenseAccepTime(dto.getLicenseAccepTime());// 获取上一条信息
		entity.setNewcarOwnerIdCardNo(dto.getNewcarOwnerIdCardNo());
		entity.setCarName(dto.getCarName());
		entity.setVendorId(dto.getVendorId());
		entity.setBrandId(dto.getBrandId());
		entity.setIsMatch(dto.getIsMatch());
		return entity;
	}

	/**
	 * 变更车主信息
	 * 
	 * @return
	 * @throws TmsDaoException
	 */
	public void updateOwnerInfoBySerial(TransferAcceptedInfo entity) throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		TransferAcceptedInfoDto dto = new TransferAcceptedInfoDto();
		dto = setDtoFromEntity(entity, dto);
		uDao.updateOwnerInfoBySerial(dto);
	}

	
	
	public List<TransferAcceptedInfo> getAcceptInfoBySerialAndLicense4StatusControl(String serial, String license)
			throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		List<TransferAcceptedInfo> entityList = null;
		List<TransferAcceptedInfoDto> dtoList = uDao.getAcceptInfoBySerialAndLicense(serial, license, null);
		if (dtoList != null && dtoList.size() > 0) {
			entityList = new ArrayList<TransferAcceptedInfo>();
			for (int i = 0; i < dtoList.size(); i++) {
				TransferAcceptedInfoDto dto = dtoList.get(i);
				TransferAcceptedInfo entity = new TransferAcceptedInfo();
				entity = setEntityFromDto(entity, dto);
				entityList.add(entity);
			}
		}
		return entityList;
	}
	/**
	 * 高级搜索搜索过户信息
	 * 
	 * @return
	 * @throws TmsDaoException
	 */
	public List<TransferAcceptedInfo> getAcceptInfoBySerialAndLicense(String serial, String license, String vin)
			throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		List<TransferAcceptedInfo> entityList = null;
		List<TransferAcceptedInfoDto> dtoList = uDao.getAcceptInfoBySerialAndLicense4StatusControl(serial, license, vin);
		if (dtoList != null && dtoList.size() > 0) {
			entityList = new ArrayList<TransferAcceptedInfo>();
			for (int i = 0; i < dtoList.size(); i++) {
				TransferAcceptedInfoDto dto = dtoList.get(i);
				TransferAcceptedInfo entity = new TransferAcceptedInfo();
				entity = setEntityFromDto(entity, dto);
				entityList.add(entity);
			}
		}
		return entityList;
	}

	public TransferAcceptedInfo getAcceptInfoBySerial(String serial, String licensePlate) throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		TransferAcceptedInfo entity = null;
		TransferAcceptedInfoDto dto = uDao.getAcceptInfoBySerial(serial, licensePlate);
		if (dto != null) {
			entity = new TransferAcceptedInfo();
			entity = setEntityFromDto(entity, dto);
		}
		return entity;
	}
	
	public TransferAcceptedInfo getAcceptInfoBySerial(String serial) throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		TransferAcceptedInfo entity = null;
		TransferAcceptedInfoDto dto = uDao.getAcceptInfoBySerial(serial);
		if (dto != null) {
			entity = new TransferAcceptedInfo();
			entity = setEntityFromDto(entity, dto);
		}
		return entity;
	}

	public TransferAcceptedInfo getAcceptInfoBySerial(String serial, String licensePlate,String vin) throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		TransferAcceptedInfo entity = null;
		TransferAcceptedInfoDto dto = uDao.getAcceptInfoBySerial(serial, licensePlate,vin);
		if (dto != null) {
			entity = new TransferAcceptedInfo();
			entity = setEntityFromDto(entity, dto);
		}
		return entity;
	}
	
	public ArrayList<TransferAcceptedInfo> getAllAcceptInfoBySerial(String serial, String licensePlate)
			throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		ArrayList<TransferAcceptedInfoDto> dtoList = uDao.getAllAcceptInfoBySerial(serial, licensePlate);
		ArrayList<TransferAcceptedInfo> r = new ArrayList<TransferAcceptedInfo>();
		for (TransferAcceptedInfoDto dto : dtoList) {
			TransferAcceptedInfo entity = new TransferAcceptedInfo();
			r.add(setEntityFromDto(entity, dto));
		}
		return r;
	}

	public void updatePrintInfoBySerial(TransferAcceptedInfo entity) throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);	
		TransferAcceptedInfoDto dto = new TransferAcceptedInfoDto();
		dto.setPg_printNum(entity.getPg_printNum());
		dto.setPg_printUserId(entity.getPg_printUserId());
		dto.setUpdateUserId(entity.getUpdateUserId());
		dto.setSerial(entity.getSerial());
		uDao.updatePrintInfoBySerial(dto);
	}

	public void updatePrintInfoBySerialDb(TransferAcceptedInfo entity) throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		TransferAcceptedInfoDto dto = new TransferAcceptedInfoDto();
		dto.setDb_printNum(entity.getDb_printNum());
		dto.setDb_printUserId(entity.getDb_printUserId());
		dto.setUpdateUserId(entity.getUpdateUserId());
		dto.setSerial(entity.getSerial());
		uDao.updatePrintInfoBySerialDb(dto);
	}

	public void updatePrintInfoBySerialZy(TransferAcceptedInfo entity) throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		TransferAcceptedInfoDto dto = new TransferAcceptedInfoDto();
		dto.setZy_printnum(entity.getZy_printnum());
		dto.setZy_printUserId(entity.getZy_printUserId());
		dto.setUpdateUserId(entity.getUpdateUserId());
		dto.setSerial(entity.getSerial());
		uDao.updatePrintInfoBySerialZy(dto);
	}

	public void updateTransferPriceBySerial(int businessType,int transferPriceChargeType,String serial) throws TmsDaoException{
		TransferAcceptedInfoDao dao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		dao.updateTransferPriceBySerial(businessType,transferPriceChargeType,serial);
	}
	
	public void updatePrintInfoBySerialLc(TransferAcceptedInfo entity) throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		TransferAcceptedInfoDto dto = new TransferAcceptedInfoDto();
		dto.setLc_printNum(entity.getLc_printNum());
		dto.setLc_printUserId(entity.getLc_printUserId());
		dto.setUpdateUserId(entity.getUpdateUserId());
		dto.setSerial(entity.getSerial());
		uDao.updatePrintInfoBySerialLc(dto);
	}

	public void updatePrintInfoBySerialGh(TransferAcceptedInfo entity) throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		TransferAcceptedInfoDto dto = new TransferAcceptedInfoDto();
		dto.setGh_printnum(entity.getGh_printnum());
		dto.setGh_printUserId(entity.getGh_printUserId());
		dto.setUpdateUserId(entity.getUpdateUserId());
		dto.setSerial(entity.getSerial());
		uDao.updatePrintInfoBySerialGh(dto);
	}

	public void updatePrintInfoBySerialCy(TransferAcceptedInfo entity) throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		TransferAcceptedInfoDto dto = new TransferAcceptedInfoDto();
		dto.setCy_printNum(entity.getCy_printNum());
		dto.setCy_printUserId(entity.getCy_printUserId());
		dto.setUpdateUserId(entity.getUpdateUserId());
		dto.setSerial(entity.getSerial());
		uDao.updatePrintInfoBySerialCy(dto);
	}

	public void updateTransferInfoAtReback(TransferAcceptedInfo entity) throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		TransferAcceptedInfoDto dto = new TransferAcceptedInfoDto();
		dto.setSerial(entity.getSerial());
		dto.setId(entity.getId());
		dto.setStatus(entity.getStatus());
		dto.setUpdateUserId(entity.getUpdateUserId());
		uDao.updateTransferInfoAtReback(dto);
	}

	public void insertTransInfoAtBeBack(TransferAcceptedInfo entity) throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		TransferAcceptedInfoDto dto = new TransferAcceptedInfoDto();
		dto = setDtoFromEntity(entity, dto);
		dto.setPreTransfer(2);
		uDao.insertTransInfoAtBeBack(dto);
	}

	/**
	 * pad库存上传数据，根据库存流水号载入过户信息
	 * 
	 * @param basicCarId
	 * @return
	 * @throws TmsDaoException
	 */
	public TransferAcceptedInfo findTransferByBasicCarId(String basicCarId) throws TmsDaoException {
		TransferAcceptedInfo transferAcceptedInfo = new TransferAcceptedInfo();
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		TransferAcceptedInfoDto dto = new TransferAcceptedInfoDto();
		dto = uDao.findTransferByBasicCarId(basicCarId);
		if (dto != null) {// huangwei st2
			transferAcceptedInfo.setSerial(dto.getSerial());
			transferAcceptedInfo.setPhoto_1(dto.getPhoto_1());
			transferAcceptedInfo.setPhoto_2(dto.getPhoto_2());
			transferAcceptedInfo.setPhoto_3(dto.getPhoto_3());
			transferAcceptedInfo.setPhoto_4(dto.getPhoto_4());
			transferAcceptedInfo.setStatus(dto.getStatus());
			transferAcceptedInfo.setCheckUserid(dto.getCheckUserid());
			transferAcceptedInfo.setPicChangeNum(dto.getPicChangeNum());
			transferAcceptedInfo.setCy_printTime(String.valueOf(dto.getCy_printTime()));
		}
		return transferAcceptedInfo;
	}

	/**
	 * pad库存修改过户
	 * 
	 * @param entity
	 * @throws TmsDaoException
	 */
	public void updatePadMarket(TransferAcceptedInfo entity) throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		TransferAcceptedInfoDto dto = new TransferAcceptedInfoDto();
		dto.setPhoto_1(entity.getPhoto_1());
		dto.setPhoto_2(entity.getPhoto_2());
		dto.setPhoto_3(entity.getPhoto_3());
		dto.setPhoto_4(entity.getPhoto_4());
		dto.setSerial(entity.getSerial());
		dto.setPicChangeNum(entity.getPicChangeNum());
		dto.setPicChangeUserId(entity.getPicChangeUserId());
		dto.setUpdateUserId(entity.getUpdateUserId());
		uDao.updatePadMarket(dto);
	}

	public void updateLicenseBySerial(TransferAcceptedInfo entity) throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		TransferAcceptedInfoDto dto = new TransferAcceptedInfoDto();
		dto.setLicensePlate(entity.getLicensePlate());
		dto.setSerial(entity.getSerial());
		dto.setUpdateUserId(entity.getUpdateUserId());
		uDao.updateLicenseBySerial(dto);
	}

	public void updateAcceptedInfoByLicenseplate(String serial, int marketType, String licenseplate)
			throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		uDao.updateAcceptedInfoByLicenseplate(serial, marketType, licenseplate);
	}

	public List<TransferAcceptedInfo> getAcceptInfoByJYMonth(String month) throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		List<TransferAcceptedInfoDto> dtoList = uDao.getAcceptInfoByJYMonth(month);
		List<TransferAcceptedInfo> list = null;
		if (dtoList != null) {
			list = new ArrayList<TransferAcceptedInfo>();
			for (int i = 0; i < dtoList.size(); i++) {
				TransferAcceptedInfoDto dto = (TransferAcceptedInfoDto) dtoList.get(i);
				TransferAcceptedInfo entity = new TransferAcceptedInfo();
				entity.setVin(dto.getVin());
				entity.setMarketType(dto.getMarketType());
				entity.setBasicCarId(dto.getBasicCarId());
				entity.setCarMarketIn(dto.getCarMarketIn());
				entity.setPrice(dto.getPrice());
				list.add(entity);
			}
		}
		return list;
	}

	public void updatePicNum(TransferAcceptedInfo entity) throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		TransferAcceptedInfoDto dto = new TransferAcceptedInfoDto();
		dto.setSerial(entity.getSerial());
		dto.setPicChangeNum(entity.getPicChangeNum());
		dto.setPicChangeUserId(entity.getPicChangeUserId());
		dto.setUpdateUserId(entity.getUpdateUserId());
		dto.setPhoto_1(entity.getPhoto_1());
		uDao.updatePicChange(dto);
	}

	/**
	 * 使用过户流水号到车辆过户信息表中搜索
	 * 
	 * @return boolean
	 * @throws TmsDaoException
	 */
	public boolean findTransInfobySerial(String transserial) throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		boolean isExist = false;
		if (!StringUtil.isNullOrBlank(transserial)) {

			isExist = uDao.findTransInfobySerial(transserial);
			return isExist;
		}
		return isExist;
	}

	/**
	 * 使用过户流水号到车辆过户信息表中搜索
	 * 
	 * @return boolean
	 * @throws TmsDaoException
	 */
	public boolean isExistTransferInfoByBasicCarId(String basicCarId) throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		boolean isExist = false;
		if (!StringUtil.isNullOrBlank(basicCarId)) {
			isExist = uDao.isExistTransferInfoByBasicCarId(basicCarId);
		}
		return isExist;
	}

	/**
	 * 使用车牌号码到车辆过户信息表中搜索
	 * 
	 * @return boolean
	 * @throws TmsDaoException
	 */
	public boolean isExistTransferInfoByLicensePlate(String licensePlate) throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		boolean isExist = false;
		if (!StringUtil.isNullOrBlank(licensePlate)) {
			isExist = uDao.isExistTransferInfoByLicensePlate(licensePlate);
		}
		return isExist;
	}

	/**
	 * 使用车架号到车辆过户信息表中搜索
	 * 
	 * @return boolean
	 * @throws TmsDaoException
	 */
	public boolean isExistTransferInfoByVin(String vin) throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		boolean isExist = false;
		if (!StringUtil.isNullOrBlank(vin)) {
			isExist = uDao.isExistTransferInfoByLicensePlate(vin);
		}
		return isExist;
	}

	public void insertCarTranserAcceptInfo(TransferAcceptedInfo acceptedInfo) throws TmsDaoException {
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		TransferAcceptedInfoDto dto = new TransferAcceptedInfoDto();

		dto.setSerial(acceptedInfo.getSerial());// 车辆流水号
		dto.setMarketType(acceptedInfo.getMarketType());// 车辆库存类型
		dto.setLicensePlate(acceptedInfo.getLicensePlate());
		dto.setCardType(Integer.valueOf(acceptedInfo.getCy_cardType()));// 号牌种类
		dto.setCarClass(acceptedInfo.getCarClass());// 车辆分类
		dto.setLicensePlateCol(acceptedInfo.getLicensePlateCol());// 号牌颜色
		dto.setTransferPrice(acceptedInfo.getTransferPrice());
		dto.setStatus(acceptedInfo.getStatus());// 过户状态
		dto.setSourceType(acceptedInfo.getSourceType());// 车辆来源状态
		dto.setInsertUserid(acceptedInfo.getInsertUserid());// 插入用户
		dto.setUpdateUserId(acceptedInfo.getUpdateUserId());// 更新用户
		dto.setBasicCarId(acceptedInfo.getBasicCarId());// 车辆编号
		dto.setVin(acceptedInfo.getVin());// 车架号
		dto.setVendorId(acceptedInfo.getVendorId());// 车辆品牌ID
		dto.setBrandId(acceptedInfo.getBrandId());// 车系ID
		dto.setCarStyleId(acceptedInfo.getCarStyleId());// 车辆款式ID
		dto.setCarName(acceptedInfo.getCarName());// 车辆名字
		dto.setIsMatch(acceptedInfo.getIsMatch());// 车款是否匹配
		dto.setPhoto_1(acceptedInfo.getPhoto_1());// 查验照片
		dto.setMemberId(acceptedInfo.getMemberId());// 商户会员ID
		dto.setPreTransfer(acceptedInfo.getPreTransfer());
		dto.setCy_printNum(acceptedInfo.getCy_printNum());
		dto.setCy_printUserId(acceptedInfo.getCy_printUserId());
		uDao.insertCarTranserAcceptInfo(dto);
	}

	public void updateTransfeAcceptedInfoBySerial(TransferAcceptedInfo entity) throws TmsDaoException {
		TransferAcceptedInfoDao dao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		TransferAcceptedInfoDto dto = new TransferAcceptedInfoDto();
		dto.setSerial(entity.getSerial());
		dto.setMarketType(entity.getMarketType());
		dto.setBasicCarId(entity.getBasicCarId());
		dto.setMemberId(entity.getMemberId());
		dto.setUpdateUserId(entity.getUpdateUserId());
		dao.updateTransfeAcceptedInfoBySerial(dto);
	}

	/**
	 * 根据流水号载入打印次数,车牌号码，车主姓名，VIN码
	 * 
	 * @param serial
	 * @return
	 * @throws TmsDaoException
	 */
	public TransferAcceptedInfo findTransferAcceptedInfoBySerial(String serial) throws TmsDaoException {

		TransferAcceptedInfo entity = new TransferAcceptedInfo();
		TransferAcceptedInfoDao dao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		TransferAcceptedInfoDto dto = new TransferAcceptedInfoDto();
		dto = dao.findTransferAcceptedInfoBySerial(serial);
		entity.setSerial(dto.getSerial());
		entity.setMarketType(dto.getMarketType());
		entity.setBasicCarId(dto.getBasicCarId());
		entity.setLicensePlate(dto.getLicensePlate());
		entity.setVin(dto.getVin());
		entity.setCy_cardType(String.valueOf(dto.getCardType()));
		entity.setCarClass(dto.getCarClass());
		entity.setMemberId(dto.getMemberId());
		entity.setNewLicensePlate(dto.getNewLicensePlate());
		entity.setVendorId(dto.getVendorId());
		entity.setBrandId(dto.getBrandId());
		entity.setCarStyleId(dto.getCarStyleId());
		entity.setCarName(dto.getCarName());
		entity.setPrice(dto.getPrice());
		entity.setIsMatch(dto.getIsMatch());
		return entity;
	}

	public TransferAcceptedInfo findTransferInfoByBasicCarId(String basicCarId) throws TmsDaoException {
		TransferAcceptedInfo entity = new TransferAcceptedInfo();
		TransferAcceptedInfoDao dao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		TransferAcceptedInfoDto dto = new TransferAcceptedInfoDto();
		dto = dao.findTransferInfoByBasicCarId(basicCarId);
		entity.setSerial(dto.getSerial());
		entity.setVin(dto.getVin());
		entity.setLicensePlate(dto.getLicensePlate());
		entity.setCarClass(dto.getCarClass());
		entity.setCy_cardType(Integer.toString(dto.getCardType()));
		entity.setLc_printNum(dto.getLc_printNum());
		entity.setCy_printNum(dto.getCy_printNum());
		entity.setCarOwner(dto.getCarOwner());
		entity.setStatus(dto.getStatus());
		return entity;
	}

	/**
	 * 根据车辆编号查询查验表打印信息
	 * 
	 * @param basicCarId
	 * @return
	 * @throws TmsDaoException
	 */
	public TransferAcceptedInfo findPrintNumInfoByBasicCarId(String basicCarId) throws TmsDaoException {
		TransferAcceptedInfo entity = new TransferAcceptedInfo();
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		TransferAcceptedInfoDto dto = new TransferAcceptedInfoDto();
		dto = uDao.findPrintNumInfoByBasicCarId(basicCarId);
		entity = setEntityFromDto(entity, dto);
		return entity;
	}

	/**
	 * 根据车架号查询
	 * 
	 * @param basicCarId
	 * @return
	 * @throws TmsDaoException
	 */
	public List<TransferAcceptedInfo> findTransferAssessInfoByVin(String vin) throws TmsDaoException {
		List<TransferAcceptedInfo> list = new ArrayList<TransferAcceptedInfo>();
		TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		List<TransferAcceptedInfoDto> dtoList = uDao.findTransferAssessInfoByVin(vin);
		if (dtoList.size() > 0) {
			for (TransferAcceptedInfoDto dto : dtoList) {
				TransferAcceptedInfo accepted = new TransferAcceptedInfo();
				accepted.setSerial(dto.getSerial());
				accepted.setInsertTime(dto.getInsertTime());
				if (dto.getInsertTime() != null) {
					accepted.setInsertTimeS(DateUtil.getDateByTimeStamp(dto.getInsertTime()));
				}
				accepted.setVin(dto.getVin());
				list.add(accepted);
			}
		}
		return list;
	}

	
	/**
	 * 
	 * 模糊查询合同编号列表
	 * 
	 * @return
	 * @throws TmsDaoException
	 */
	public List<String> findSerialList(String query,int type) throws TmsDaoException {
		TransferAcceptedInfoDao dao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
        return dao.findSerialList(query,type);
	}
	
	
	public List<String> findLicensePlateList(String query) throws TmsDaoException {
		TransferAcceptedInfoDao dao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
        return dao.findLicensePlateList(query);
	}
	
	public List<String> findVinList(String query) throws TmsDaoException {
		TransferAcceptedInfoDao dao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
        return dao.findVinList(query);
	}
	
	public List<String> findListBySerial(String[] serial) throws TmsDaoException {
		TransferAcceptedInfoDao dao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
        return dao.findListBySerial(serial);
	}
	
	public List<TransferAcceptedInfo> findListBySerial(String serial) throws TmsDaoException {
		List<TransferAcceptedInfo> list = new ArrayList<TransferAcceptedInfo>();
		
		TransferAcceptedInfoDao dao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		List<TransferAcceptedInfoDto> dtoList = dao.findListBySerial(serial);
		
		if (dtoList.size() > 0) {
			for (TransferAcceptedInfoDto dto : dtoList) {
				TransferAcceptedInfo accepted = new TransferAcceptedInfo();
				accepted.setSerial(dto.getSerial());
				accepted.setInsertTime(dto.getInsertTime());
				accepted.setVin(dto.getVin());
				accepted.setLicensePlate(dto.getLicensePlate());
				accepted.setMemberId(dto.getMemberId());
				accepted.setAttnId(dto.getAttnId());
				accepted.setTransferType(dto.getTransferType());
				accepted.setCarMarketInProv(dto.getCarMarketInProv());
				accepted.setCarMarketInCity(dto.getCarMarketInCity());
				accepted.setShiftToLevel(dto.getShiftToLevel());
				accepted.setMaterialImages1(dto.getMaterialImages1());
				accepted.setMaterialImages2(dto.getMaterialImages2());
				accepted.setMaterialImages3(dto.getMaterialImages3());
				accepted.setMaterialImages4(dto.getMaterialImages4());
				accepted.setMaterialImages5(dto.getMaterialImages5());
				accepted.setMaterialImages6(dto.getMaterialImages6());
				accepted.setMaterialImages7(dto.getMaterialImages7());
				accepted.setMaterialImages8(dto.getMaterialImages8());
				accepted.setMaterialImages9(dto.getMaterialImages9());
				accepted.setMaterialImages10(dto.getMaterialImages10());
				accepted.setProName(dto.getProName());
				accepted.setCityName(dto.getCityName());
				accepted.setTransferRegister(dto.getTransferRegister());
				accepted.setCarOwnerIdCardNo(dto.getCarOwnerIdCardNo());
				accepted.setCarOwner(dto.getCarOwner());
				accepted.setOwnerPhone(dto.getOwnerPhone());
				accepted.setOwnerAddress(dto.getOwnerAddress());
				accepted.setAgentName(dto.getAgentName());
				accepted.setAgentOwnerIdCardNo(dto.getAgentOwnerIdCardNo());
				accepted.setAgentAddress(dto.getAgentAddress());
				accepted.setAgentPhone(dto.getAgentPhone());
				accepted.setOwnerType(dto.getOwnerType());
				accepted.setOwnerOrgNo(dto.getOwnerOrgNo());
				accepted.setChangeBody(dto.getChangeBody());
				accepted.setStatus(dto.getStatus());
				accepted.setEpStandard(dto.getEpStandard());// 环保达标
				accepted.setCarReplaceType(dto.getCarReplaceType());// 客车换型
				accepted.setCarPeccancy(dto.getCarPeccancy());// 车辆违章
				accepted.setOverdue(dto.getOverdue());// 超检审核
				accepted.setMortgage(dto.getMortgage());// 抵押审核
				accepted.setSealup(dto.getSealup());// 查封审核
				accepted.setRegistration(dto.getRegistration());// 登记证书
				accepted.setDrivingLicense(dto.getDrivingLicense());// 行驶证
				accepted.setScrapOverdue(dto.getScrapOverdue());// 报废超期
				accepted.setRobbery(dto.getRobbery());// 盗抢审核
				accepted.setPsRemark(dto.getPsRemark());// 公安审核备注
				accepted.setOwnerEscaping(dto.getOwnerEscaping());// 原车主在逃
				accepted.setOwnerScrap(dto.getOwnerScrap());// 原车主报废车
				accepted.setOwnerRemark(dto.getOwnerRemark());// 原车主备注
				accepted.setNewEscaping(dto.getNewEscaping());// 新车主在逃
				accepted.setNewScrap(dto.getNewScrap());// 新车主报废车
				accepted.setNewLive(dto.getNewLive());// 新车主居住证
				
				//
				accepted.setCy_printTime(dto.getCy_printTime()!=null?DateUtil.DateToString12(dto.getCy_printTime()):"");
				accepted.setVendorCode(dto.getVendorCode());
				accepted.setModelCode(dto.getModelCode());
				accepted.setCarType(dto.getCarType());//
				accepted.setCountryStyle(dto.getCountryStyle());//
				accepted.setCarUse(dto.getCarUse());//
				accepted.setCardType(dto.getCardType());//
				accepted.setRegisterCardNo(dto.getRegisterCardNo());
				accepted.setRegDate(dto.getRegDate());
				accepted.setGainType(dto.getGainType());//
				accepted.setPrice(dto.getPrice());
				accepted.setNewcarOwner(dto.getNewcarOwner());
				accepted.setNewOwnerPhone(dto.getNewOwnerPhone());
				accepted.setNewOwnerAddress(dto.getNewOwnerAddress());
				accepted.setNewAgentOwnerIdCardNo(dto.getNewAgentOwnerIdCardNo());
				accepted.setNewAgentName(dto.getNewAgentName());
				accepted.setNewAgentPhone(dto.getNewAgentPhone());
				accepted.setNewAgentAddress(dto.getNewAgentAddress());
				accepted.setNewOwnerZipCode(dto.getNewOwnerZipCode());
				accepted.setNewOwnerType(dto.getNewOwnerType());
				accepted.setNewcarOwnerIdCardNo(dto.getNewcarOwnerIdCardNo());
				accepted.setNewOwnerOrgNo(dto.getNewOwnerOrgNo());
				list.add(accepted);
			}
		}
        return list;
	}
	
	public void updatePublicSecurityAuditBySerial(TransferAcceptedInfo transferAcceptedInfo) throws TmsDaoException {
		TransferAcceptedInfoDao dao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		TransferAcceptedInfoDto dto = new TransferAcceptedInfoDto();
		
		dto.setTransferRegister(transferAcceptedInfo.getTransferRegister());
		dto.setEpStandard(transferAcceptedInfo.getEpStandard());//环保达标
		dto.setCarReplaceType(transferAcceptedInfo.getCarReplaceType());//客车换型
		dto.setCarPeccancy(transferAcceptedInfo.getCarPeccancy());//车辆违章
		dto.setOverdue(transferAcceptedInfo.getOverdue());//超检审核
		dto.setMortgage(transferAcceptedInfo.getMortgage());//抵押审核
		dto.setSealup(transferAcceptedInfo.getSealup());//查封审核
		dto.setRegistration(transferAcceptedInfo.getRegistration());//登记证书
		dto.setDrivingLicense(transferAcceptedInfo.getDrivingLicense());//行驶证
		dto.setScrapOverdue(transferAcceptedInfo.getScrapOverdue());//报废超期
		dto.setRobbery(transferAcceptedInfo.getRobbery());//盗抢审核
		dto.setOwnerEscaping(transferAcceptedInfo.getOwnerEscaping());//原车主在逃
		dto.setOwnerScrap(transferAcceptedInfo.getOwnerScrap());//原车主报废车
		dto.setNewEscaping(transferAcceptedInfo.getNewEscaping());//新车主在逃
		dto.setNewScrap(transferAcceptedInfo.getNewScrap());//新车主报废车
		dto.setNewLive(transferAcceptedInfo.getNewLive());//新车主居住证
		dto.setSerial(transferAcceptedInfo.getSerial());//车辆流水号
		dto.setUpdateUserId(transferAcceptedInfo.getUpdateUserId());//更新用户ID
		dto.setStatus(transferAcceptedInfo.getStatus());
		
		dao.updatePublicSecurityAuditBySerial(dto);

	}
	
	public void updateCarOwnerAuditBySerial(TransferAcceptedInfo transferAcceptedInfo) throws TmsDaoException {
		TransferAcceptedInfoDao dao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		TransferAcceptedInfoDto dto = new TransferAcceptedInfoDto();
		
		dto.setSerial(transferAcceptedInfo.getSerial());
		dto.setTransfer(transferAcceptedInfo.getTransfer());
		dto.setUpdateUserId(transferAcceptedInfo.getUpdateUserId());//更新用户ID
		dto.setStatus(transferAcceptedInfo.getStatus());
		
		dao.updateCarOwnerAuditBySerial(dto);

	}
	
	public Map<String, Integer> getTransferRegisterInfo(String serial)  throws TmsDaoException {
		TransferAcceptedInfoDao dao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		return dao.getTransferRegisterInfo(serial);
	}
	
	public Map<String, Integer> getTransferAcceptedInfo(String serial)  throws TmsDaoException {
		TransferAcceptedInfoDao dao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		return dao.getTransferAcceptedInfo(serial);
	}
	
	public void insertTransferRegisterInfo(TransferAcceptedInfo transferAcceptedInfo) throws TmsDaoException {
		
		TransferAcceptedInfoDao dao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		TransferAcceptedInfoDto dto = new TransferAcceptedInfoDto();
		
		dto.setEpStandard(transferAcceptedInfo.getEpStandard());//环保达标
		dto.setCarReplaceType(transferAcceptedInfo.getCarReplaceType());//客车换型
		dto.setCarPeccancy(transferAcceptedInfo.getCarPeccancy());//车辆违章
		dto.setOverdue(transferAcceptedInfo.getOverdue());//超检审核
		dto.setMortgage(transferAcceptedInfo.getMortgage());//抵押审核
		dto.setSealup(transferAcceptedInfo.getSealup());//查封审核
		dto.setRegistration(transferAcceptedInfo.getRegistration());//登记证书
		dto.setDrivingLicense(transferAcceptedInfo.getDrivingLicense());//行驶证
		dto.setScrapOverdue(transferAcceptedInfo.getScrapOverdue());//报废超期
		dto.setRobbery(transferAcceptedInfo.getRobbery());//盗抢审核
		dto.setOwnerEscaping(transferAcceptedInfo.getOwnerEscaping());//原车主在逃
		dto.setOwnerScrap(transferAcceptedInfo.getOwnerScrap());//原车主报废车
		dto.setNewEscaping(transferAcceptedInfo.getNewEscaping());//新车主在逃
		dto.setNewScrap(transferAcceptedInfo.getNewScrap());//新车主报废车
		dto.setNewLive(transferAcceptedInfo.getNewLive());//新车主居住证
		dto.setSerial(transferAcceptedInfo.getSerial());//车辆流水号
		dto.setUpdateUserId(transferAcceptedInfo.getUpdateUserId());//更新用户ID
		
		dao.insertTransferRegisterInfo(dto);
	}
	
	public void updateAcceptInfo003(TransferAcceptedInfoDto dto) throws TmsDaoException{
		TransferAcceptedInfoDao dao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		dao.updateAcceptInfo003(dto);
	}
	
	public List<TransferAcceptedInfo> getAuditingTransfers() throws TmsDaoException {
		final List<TransferAcceptedInfo> r = new ArrayList<TransferAcceptedInfo>();
		TransferAcceptedInfoDao dao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO, getPageNo(), getMaxIndex(), getSortKey(), isAsc());
		ViewListDao idao = (ViewListDao) TmsDao.getViewListDao((TmsDao) dao, TmsDao.TMS_TRANSFER_ACCEPTED_INFO); 
		final List<TransferAcceptedInfoDto> transfers = dao.getAuditingTransfers();
		if (transfers != null) {
			for (int i = 0; i < transfers.size(); i++) {
				final TransferAcceptedInfoDto dto = transfers.get(i);
				final TransferAcceptedInfo info = new TransferAcceptedInfo();
				
				if (i%2 == 0){
					info.setCssFlag(1);
				} else{
					info.setCssFlag(2);
				}
				
				r.add(info);
				info.setNum(i + 1);
				info.setVin(dto.getVin());
				info.setSerial(dto.getSerial());
				info.setStatus(dto.getStatus());
				info.setPhoto_1(dto.getPhoto_1());
				info.setAttnName(dto.getAttnName());
				info.setRealName(dto.getRealName());
				info.setTransfer(dto.getTransfer());
				info.setInsertTimeS(dto.getInsertTimeS());
				info.setLicensePlate(dto.getLicensePlate());
				info.setCheckFileTimeS(dto.getCheckFileTimeS());
				info.setNewLicensePlate(dto.getNewLicensePlate());
				info.setTransferRegister(dto.getTransferRegister());
				info.setCy_cardType(Codes.getInstance().getItemValueByItemIdAndItemCode(Codes.PLATE_TYPE, dto.getCardType()));
				if (dto.getStatus() == 11) { // 
					info.setTransferReason(dao.getTransferReason(dto.getSerial()));
				}
			}	
		}
		setPagingInfo(idao);
		return r;
	}
	
	public List<TransferAcceptedInfo> getAuditingTransfers(String loginId) throws TmsDaoException {
		final List<TransferAcceptedInfo> r = new ArrayList<TransferAcceptedInfo>();
		TransferAcceptedInfoDao dao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO, getPageNo(), getMaxIndex(), getSortKey(), isAsc());
		ViewListDao idao = (ViewListDao) TmsDao.getViewListDao((TmsDao) dao, TmsDao.TMS_TRANSFER_ACCEPTED_INFO); 
		final List<TransferAcceptedInfoDto> transfers = dao.getAuditingTransfers(loginId);
		if (transfers != null) {
			for (int i = 0; i < transfers.size(); i++) {
				final TransferAcceptedInfoDto dto = transfers.get(i);
				final TransferAcceptedInfo info = new TransferAcceptedInfo();
				
				if (i%2 == 0){
					info.setCssFlag(1);
				} else{
					info.setCssFlag(2);
				}
				
				r.add(info);
				info.setNum(i + 1);
				info.setVin(dto.getVin());
				info.setStatus(dto.getStatus());
				info.setSerial(dto.getSerial());
				info.setPhoto_1(dto.getPhoto_1());
				info.setAttnName(dto.getAttnName());
				info.setRealName(dto.getRealName());
				info.setTransfer(dto.getTransfer());
				info.setInsertTimeS(dto.getInsertTimeS());
				info.setLicensePlate(dto.getLicensePlate());
				info.setCheckFileTimeS(dto.getCheckFileTimeS());
				info.setNewLicensePlate(dto.getNewLicensePlate());
				info.setTransferRegister(dto.getTransferRegister());
				info.setCy_cardType(Codes.getInstance().getItemValueByItemIdAndItemCode(Codes.PLATE_TYPE, dto.getCardType()));
				if (dto.getStatus() == 11) { // 
					info.setTransferReason(dao.getTransferReason(dto.getSerial()));
				}
			}	
		}
		setPagingInfo(idao);
		return r;
	}

	public List<TransferAcceptedInfo> getTransfers(String serial, String vin, String licensePlate) throws TmsDaoException {
		final List<TransferAcceptedInfo> r = new ArrayList<TransferAcceptedInfo>();
		TransferAcceptedInfoDao dao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO, getPageNo(), getMaxIndex(), getSortKey(), isAsc());
		ViewListDao idao = (ViewListDao) TmsDao.getViewListDao((TmsDao) dao, TmsDao.TMS_TRANSFER_ACCEPTED_INFO); 
		final List<TransferAcceptedInfoDto> transfers = dao.getTransfers(serial, vin, licensePlate);
		if (transfers != null) {
			for (int i = 0; i < transfers.size(); i++) {
				final TransferAcceptedInfoDto dto = transfers.get(i);
				final TransferAcceptedInfo info = new TransferAcceptedInfo();
				
				if (i%2 == 0){
					info.setCssFlag(1);
				} else{
					info.setCssFlag(2);
				}
				
				r.add(info);
				info.setNum(i + 1);
				info.setVin(dto.getVin());
				info.setSerial(dto.getSerial());
				info.setStatus(dto.getStatus());
				info.setPhoto_1(dto.getPhoto_1());
				info.setAttnName(dto.getAttnName());
				info.setRealName(dto.getRealName());
				info.setTransfer(dto.getTransfer());
				info.setCarOwner(dto.getCarOwner());
				info.setInsertTimeS(dto.getInsertTimeS());
				info.setLicensePlate(dto.getLicensePlate());
				info.setCheckFileTimeS(dto.getCheckFileTimeS());
				info.setCarMarketIn(dto.getNewLicensePlate());
				info.setTransferRegister(dto.getTransferRegister());
				info.setCy_cardType(dto.getCy_cardType().toString());
			}	
		}
		setPagingInfo(idao);
		return r;
	}
	public List<TransferAcceptedInfo> getAllTransfers(String serial, String vin, String licensePlate) throws TmsDaoException {
		final List<TransferAcceptedInfo> r = new ArrayList<TransferAcceptedInfo>();
		TransferAcceptedInfoDao dao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO, getPageNo(), getMaxIndex(), getSortKey(), isAsc());
		ViewListDao idao = (ViewListDao) TmsDao.getViewListDao((TmsDao) dao, TmsDao.TMS_TRANSFER_ACCEPTED_INFO); 
		final List<TransferAcceptedInfoDto> transfers = dao.getAllTransfers(serial, vin, licensePlate);
		if (transfers != null) {
			for (int i = 0; i < transfers.size(); i++) {
				final TransferAcceptedInfoDto dto = transfers.get(i);
				final TransferAcceptedInfo info = new TransferAcceptedInfo();
				
				if (i%2 == 0){
					info.setCssFlag(1);
				} else{
					info.setCssFlag(2);
				}
				
				r.add(info);
				info.setNum(i + 1);
				info.setVin(dto.getVin());
				info.setSerial(dto.getSerial());
				info.setStatus(dto.getStatus());
				info.setPhoto_1(dto.getPhoto_1());
				info.setAttnName(dto.getAttnName());
				info.setRealName(dto.getRealName());
				info.setTransfer(dto.getTransfer());
				info.setInsertTimeS(dto.getInsertTimeS());
				info.setLicensePlate(dto.getLicensePlate());
				info.setCheckFileTimeS(dto.getCheckFileTimeS());
				info.setCarMarketIn(dto.getNewLicensePlate());
				info.setTransferRegister(dto.getTransferRegister());
				info.setCy_cardType(Codes.getInstance().getItemValueByItemIdAndItemCode(Codes.PLATE_TYPE, dto.getCardType()));
			}	
		}
		setPagingInfo(idao);
		return r;
	}
	
	public List<TransferAcceptedInfo> getAllTransfers(String serial, String vin, String licensePlate, String loginId) throws TmsDaoException {
		final List<TransferAcceptedInfo> r = new ArrayList<TransferAcceptedInfo>();
		TransferAcceptedInfoDao dao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO, getPageNo(), getMaxIndex(), getSortKey(), isAsc());
		ViewListDao idao = (ViewListDao) TmsDao.getViewListDao((TmsDao) dao, TmsDao.TMS_TRANSFER_ACCEPTED_INFO); 
		final List<TransferAcceptedInfoDto> transfers = dao.getAllTransfers(serial, vin, licensePlate, loginId);
		if (transfers != null) {
			for (int i = 0; i < transfers.size(); i++) {
				final TransferAcceptedInfoDto dto = transfers.get(i);
				final TransferAcceptedInfo info = new TransferAcceptedInfo();
				
				if (i%2 == 0){
					info.setCssFlag(1);
				} else{
					info.setCssFlag(2);
				}
				
				r.add(info);
				info.setNum(i + 1);
				info.setVin(dto.getVin());
				info.setStatus(dto.getStatus());
				info.setSerial(dto.getSerial());
				info.setPhoto_1(dto.getPhoto_1());
				info.setAttnName(dto.getAttnName());
				info.setRealName(dto.getRealName());
				info.setTransfer(dto.getTransfer());
				info.setInsertTimeS(dto.getInsertTimeS());
				info.setLicensePlate(dto.getLicensePlate());
				info.setCheckFileTimeS(dto.getCheckFileTimeS());
				info.setCarMarketIn(dto.getNewLicensePlate());
				info.setTransferRegister(dto.getTransferRegister());
				info.setCy_cardType(Codes.getInstance().getItemValueByItemIdAndItemCode(Codes.PLATE_TYPE, dto.getCardType()));
			}	
		}
		setPagingInfo(idao);
		return r;
	}
	
	public List<TransferAcceptedInfo> getProcessingTransfers() throws TmsDaoException {
		final List<TransferAcceptedInfo> r = new ArrayList<TransferAcceptedInfo>();
		TransferAcceptedInfoDao dao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO, getPageNo(), getMaxIndex(), getSortKey(), isAsc());
		ViewListDao idao = (ViewListDao) TmsDao.getViewListDao((TmsDao) dao, TmsDao.TMS_TRANSFER_ACCEPTED_INFO); 
		final List<TransferAcceptedInfoDto> transfers = dao.getProcessingTransfers();
		if (transfers != null) {
			for (int i = 0; i < transfers.size(); i++) {
				final TransferAcceptedInfoDto dto = transfers.get(i);
				final TransferAcceptedInfo info = new TransferAcceptedInfo();
				
				if (i%2 == 0){
					info.setCssFlag(1);
				} else{
					info.setCssFlag(2);
				}
				
				r.add(info);
				info.setNum(i + 1);
				info.setVin(dto.getVin());
				info.setSerial(dto.getSerial());
				info.setPhoto_1(dto.getPhoto_1());
				info.setAttnName(dto.getAttnName());
				info.setRealName(dto.getRealName());
				info.setTransfer(dto.getTransfer());
				info.setInsertTimeS(dto.getInsertTimeS());				
				info.setLicensePlate(dto.getLicensePlate());
				info.setNewLicensePlate(dto.getNewLicensePlate());
				info.setTransferRegister(dto.getTransferRegister());
				info.setCy_cardType(Codes.getInstance().getItemValueByItemIdAndItemCode(Codes.PLATE_TYPE, dto.getCardType()));
			}	
		}
		setPagingInfo(idao);
		return r;
	}
	
	public List<TransferAcceptedInfo> getProcessingTransfers(String loginId) throws TmsDaoException {
		final List<TransferAcceptedInfo> r = new ArrayList<TransferAcceptedInfo>();
		TransferAcceptedInfoDao dao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO, getPageNo(), getMaxIndex(), getSortKey(), isAsc());
		ViewListDao idao = (ViewListDao) TmsDao.getViewListDao((TmsDao) dao, TmsDao.TMS_TRANSFER_ACCEPTED_INFO); 
		final List<TransferAcceptedInfoDto> transfers = dao.getProcessingTransfers(loginId);
		if (transfers != null) {
			for (int i = 0; i < transfers.size(); i++) {
				final TransferAcceptedInfoDto dto = transfers.get(i);
				final TransferAcceptedInfo info = new TransferAcceptedInfo();
				
				if (i%2 == 0){
					info.setCssFlag(1);
				} else{
					info.setCssFlag(2);
				}
				
				r.add(info);
				info.setNum(i + 1);
				info.setVin(dto.getVin());
				info.setSerial(dto.getSerial());
				info.setPhoto_1(dto.getPhoto_1());
				info.setAttnName(dto.getAttnName());
				info.setRealName(dto.getRealName());
				info.setTransfer(dto.getTransfer());
				info.setInsertTimeS(dto.getInsertTimeS());				
				info.setLicensePlate(dto.getLicensePlate());
				info.setNewLicensePlate(dto.getNewLicensePlate());
				info.setTransferRegister(dto.getTransferRegister());
				info.setCy_cardType(Codes.getInstance().getItemValueByItemIdAndItemCode(Codes.PLATE_TYPE, dto.getCardType()));
			}	
		}
		setPagingInfo(idao);
		return r;
	}
	
	public void updateAcceptInfo000102(TransferAcceptedInfoDto dto) throws TmsDaoException {
		TransferAcceptedInfoDao dao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		dao.updateAcceptInfo000102(dto);
	}
	
	public void saveAcceptInfo000102(TransferAcceptedInfoDto dto) throws TmsDaoException {
		TransferAcceptedInfoDao dao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		dao.saveAcceptInfo000102(dto);
	}
	
	public TransferAcceptedInfoDto getAssessInfo001(String serial) throws TmsDaoException {
		TransferAcceptedInfoDao dao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		return dao.getAssessInfo001(serial);
	}
	
	public void updateAcceptInfo001(TransferAcceptedInfoDto dto) throws TmsDaoException {
		TransferAcceptedInfoDao dao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		dao.updateAcceptInfo001(dto);
	}
	
	public void updateAcceptInfo002(TransferAcceptedInfoDto dto) throws TmsDaoException {
		TransferAcceptedInfoDao dao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
		dao.updateAcceptInfo002(dto);
	}
	
	/**
	 * 
	 */
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}
	
	public int getCssFlag() {
		return cssFlag;
	}

	public void setCssFlag(int cssFlag) {
		this.cssFlag = cssFlag;
	}

	public String getSerial() {
		return serial;
	}

	public void setSerial(String serial) {
		this.serial = serial;
	}

	public int getMarketType() {
		return marketType;
	}

	public void setMarketType(int marketType) {
		this.marketType = marketType;
	}

	public String getBasicCarId() {
		return basicCarId;
	}

	public void setBasicCarId(String basicCarId) {
		this.basicCarId = basicCarId;
	}

	public String getLicensePlate() {
		return licensePlate;
	}

	public void setLicensePlate(String licensePlate) {
		this.licensePlate = licensePlate;
	}

	public String getVin() {
		return vin;
	}

	public void setVin(String vin) {
		this.vin = vin;
	}

	public String getCy_cardType() {
		return cy_cardType;
	}

	public void setCy_cardType(String cyCardType) {
		cy_cardType = cyCardType;
	}

	public int getOwnerType() {
		return ownerType;
	}

	public void setOwnerType(int ownerType) {
		this.ownerType = ownerType;
	}

	public String getCarOwner() {
		return carOwner;
	}

	public void setCarOwner(String carOwner) {
		this.carOwner = carOwner;
	}

	public String getCarOwnerIdCardNo() {
		return carOwnerIdCardNo;
	}

	public void setCarOwnerIdCardNo(String carOwnerIdCardNo) {
		this.carOwnerIdCardNo = carOwnerIdCardNo;
	}

	public String getOwnerOrgNo() {
		return ownerOrgNo;
	}

	public void setOwnerOrgNo(String ownerOrgNo) {
		this.ownerOrgNo = ownerOrgNo;
	}

	public String getOwnerAddress() {
		return ownerAddress;
	}

	public void setOwnerAddress(String ownerAddress) {
		this.ownerAddress = ownerAddress;
	}

	public int getRegistration() {
		return registration;
	}

	public void setRegistration(int registration) {
		this.registration = registration;
	}

	public int getTransfer() {
		return transfer;
	}

	public void setTransfer(int transfer) {
		this.transfer = transfer;
	}

	public int getTransferRegister() {
		return transferRegister;
	}

	public void setTransferRegister(int transferRegister) {
		this.transferRegister = transferRegister;
	}

	public int getChangesVacate() {
		return changesVacate;
	}

	public void setChangesVacate(int changesVacate) {
		this.changesVacate = changesVacate;
	}

	public int getChangeColor() {
		return changeColor;
	}

	public void setChangeColor(int changeColor) {
		this.changeColor = changeColor;
	}

	public int getConformityMark() {
		return conformityMark;
	}

	public void setConformityMark(int conformityMark) {
		this.conformityMark = conformityMark;
	}

	public int getChangeBody() {
		return changeBody;
	}

	public void setChangeBody(int changeBody) {
		this.changeBody = changeBody;
	}

	public int getChangeEngine() {
		return changeEngine;
	}

	public void setChangeEngine(int changeEngine) {
		this.changeEngine = changeEngine;
	}

	public int getChangeUsenature() {
		return changeUsenature;
	}

	public void setChangeUsenature(int changeUsenature) {
		this.changeUsenature = changeUsenature;
	}

	public int getRepeatVIN() {
		return repeatVIN;
	}

	public void setRepeatVIN(int repeatVIN) {
		this.repeatVIN = repeatVIN;
	}

	public int getRepeatEngineNum() {
		return repeatEngineNum;
	}

	public void setRepeatEngineNum(int repeatEngineNum) {
		this.repeatEngineNum = repeatEngineNum;
	}

	public int getChangeAllCar() {
		return changeAllCar;
	}

	public void setChangeAllCar(int changeAllCar) {
		this.changeAllCar = changeAllCar;
	}

	public int getApplyCertificate() {
		return applyCertificate;
	}

	public void setApplyCertificate(int applyCertificate) {
		this.applyCertificate = applyCertificate;
	}

	public int getReplacementCertificate() {
		return replacementCertificate;
	}

	public void setReplacementCertificate(int replacementCertificate) {
		this.replacementCertificate = replacementCertificate;
	}

	public int getMonitoringSales() {
		return monitoringSales;
	}

	public void setMonitoringSales(int monitoringSales) {
		this.monitoringSales = monitoringSales;
	}

	public int getOther() {
		return other;
	}

	public void setOther(int other) {
		this.other = other;
	}

	public String getVinNum() {
		return vinNum;
	}

	public void setVinNum(String vinNum) {
		this.vinNum = vinNum;
	}

	public String getEngineNum() {
		return engineNum;
	}

	public void setEngineNum(String engineNum) {
		this.engineNum = engineNum;
	}

	public String getCy_color() {
		return cy_color;
	}

	public void setCy_color(String cyColor) {
		cy_color = cyColor;
	}

	public String getCy_passenger() {
		return cy_passenger;
	}

	public void setCy_passenger(String cyPassenger) {
		cy_passenger = cyPassenger;
	}

	public String getCy_carType() {
		return cy_carType;
	}

	public void setCy_carType(String cyCarType) {
		cy_carType = cyCarType;
	}

	public String getPlateOrTireExterior() {
		return plateOrTireExterior;
	}

	public void setPlateOrTireExterior(String plateOrTireExterior) {
		this.plateOrTireExterior = plateOrTireExterior;
	}

	public String getTireIntact() {
		return tireIntact;
	}

	public void setTireIntact(String tireIntact) {
		this.tireIntact = tireIntact;
	}

	public String getSeatBelt() {
		return seatBelt;
	}

	public void setSeatBelt(String seatBelt) {
		this.seatBelt = seatBelt;
	}

	public String getNumberAxes() {
		return numberAxes;
	}

	public void setNumberAxes(String numberAxes) {
		this.numberAxes = numberAxes;
	}

	public String getTireSize() {
		return tireSize;
	}

	public void setTireSize(String tireSize) {
		this.tireSize = tireSize;
	}

	public String getLateralPortionOf() {
		return lateralPortionOf;
	}

	public void setLateralPortionOf(String lateralPortionOf) {
		this.lateralPortionOf = lateralPortionOf;
	}

	public String getReflectiveMark() {
		return reflectiveMark;
	}

	public void setReflectiveMark(String reflectiveMark) {
		this.reflectiveMark = reflectiveMark;
	}

	public String getFireExtinguisher() {
		return fireExtinguisher;
	}

	public void setFireExtinguisher(String fireExtinguisher) {
		this.fireExtinguisher = fireExtinguisher;
	}

	public String getDrivingRecord() {
		return drivingRecord;
	}

	public void setDrivingRecord(String drivingRecord) {
		this.drivingRecord = drivingRecord;
	}

	public String getSecurity() {
		return security;
	}

	public void setSecurity(String security) {
		this.security = security;
	}

	public String getExternalMarking() {
		return externalMarking;
	}

	public void setExternalMarking(String externalMarking) {
		this.externalMarking = externalMarking;
	}

	public String getSiren() {
		return Siren;
	}

	public void setSiren(String siren) {
		Siren = siren;
	}

	public String getSecurityTechnology() {
		return securityTechnology;
	}

	public void setSecurityTechnology(String securityTechnology) {
		this.securityTechnology = securityTechnology;
	}

	public String getCheckConclusion() {
		return checkConclusion;
	}

	public void setCheckConclusion(String checkConclusion) {
		this.checkConclusion = checkConclusion;
	}

	public String getPhoto_1() {
		return photo_1;
	}

	public void setPhoto_1(String photo_1) {
		this.photo_1 = photo_1;
	}

	public String getPhoto_2() {
		return photo_2;
	}

	public void setPhoto_2(String photo_2) {
		this.photo_2 = photo_2;
	}

	public String getPhoto_3() {
		return photo_3;
	}

	public void setPhoto_3(String photo_3) {
		this.photo_3 = photo_3;
	}

	public String getPhoto_4() {
		return photo_4;
	}

	public void setPhoto_4(String photo_4) {
		this.photo_4 = photo_4;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public int getLc_printNum() {
		return lc_printNum;
	}

	public void setLc_printNum(int lcPrintNum) {
		lc_printNum = lcPrintNum;
	}

	public int getCy_printNum() {
		return cy_printNum;
	}

	public void setCy_printNum(int cyPrintNum) {
		cy_printNum = cyPrintNum;
	}

	public int getPg_price() {
		return pg_price;
	}

	public void setPg_price(int pgPrice) {
		pg_price = pgPrice;
	}

	public int getPg_printNum() {
		return pg_printNum;
	}

	public void setPg_printNum(int pgPrintNum) {
		pg_printNum = pgPrintNum;
	}

	public int getDb_printNum() {
		return db_printNum;
	}

	public void setDb_printNum(int dbPrintNum) {
		db_printNum = dbPrintNum;
	}

	public String getCarOwnerIdCardNoOld() {
		return carOwnerIdCardNoOld;
	}

	public void setCarOwnerIdCardNoOld(String carOwnerIdCardNoOld) {
		this.carOwnerIdCardNoOld = carOwnerIdCardNoOld;
	}

	public String getOwnerAddressOld() {
		return ownerAddressOld;
	}

	public void setOwnerAddressOld(String ownerAddressOld) {
		this.ownerAddressOld = ownerAddressOld;
	}

	public String getAgentName() {
		return agentName;
	}

	public void setAgentName(String agentName) {
		this.agentName = agentName;
	}

	public String getAgentOwnerIdCardNo() {
		return agentOwnerIdCardNo;
	}

	public void setAgentOwnerIdCardNo(String agentOwnerIdCardNo) {
		this.agentOwnerIdCardNo = agentOwnerIdCardNo;
	}

	public String getAgentAddress() {
		return agentAddress;
	}

	public void setAgentAddress(String agentAddress) {
		this.agentAddress = agentAddress;
	}

	public String getAgentPhone() {
		return agentPhone;
	}

	public void setAgentPhone(String agentPhone) {
		this.agentPhone = agentPhone;
	}

	public int getNewOwnerType() {
		return newOwnerType;
	}

	public void setNewOwnerType(int newOwnerType) {
		this.newOwnerType = newOwnerType;
	}

	public String getNewcarOwner() {
		return newcarOwner;
	}

	public void setNewcarOwner(String newcarOwner) {
		this.newcarOwner = newcarOwner;
	}

	public String getNewcarOwnerIdCardNo() {
		return newcarOwnerIdCardNo;
	}

	public void setNewcarOwnerIdCardNo(String newcarOwnerIdCardNo) {
		this.newcarOwnerIdCardNo = newcarOwnerIdCardNo;
	}

	public String getNewOwnerPhone() {
		return newOwnerPhone;
	}

	public void setNewOwnerPhone(String newOwnerPhone) {
		this.newOwnerPhone = newOwnerPhone;
	}

	public String getNewOwnerAddress() {
		return newOwnerAddress;
	}

	public void setNewOwnerAddress(String newOwnerAddress) {
		this.newOwnerAddress = newOwnerAddress;
	}

	public String getNewOwnerOrgNo() {
		return newOwnerOrgNo;
	}

	public void setNewOwnerOrgNo(String newOwnerOrgNo) {
		this.newOwnerOrgNo = newOwnerOrgNo;
	}

	public String getZipCode() {
		return zipCode;
	}

	public void setZipCode(String zipCode) {
		this.zipCode = zipCode;
	}

	public String getMailAddress() {
		return mailAddress;
	}

	public void setMailAddress(String mailAddress) {
		this.mailAddress = mailAddress;
	}

	public String getNewAgentName() {
		return newAgentName;
	}

	public void setNewAgentName(String newAgentName) {
		this.newAgentName = newAgentName;
	}

	public String getNewAgentOwnerIdCardNo() {
		return newAgentOwnerIdCardNo;
	}

	public void setNewAgentOwnerIdCardNo(String newAgentOwnerIdCardNo) {
		this.newAgentOwnerIdCardNo = newAgentOwnerIdCardNo;
	}

	public String getNewAgentAddress() {
		return newAgentAddress;
	}

	public void setNewAgentAddress(String newAgentAddress) {
		this.newAgentAddress = newAgentAddress;
	}

	public String getNewAgentPhone() {
		return newAgentPhone;
	}

	public void setNewAgentPhone(String newAgentPhone) {
		this.newAgentPhone = newAgentPhone;
	}

	public String getOwnersGroupPhoto() {
		return ownersGroupPhoto;
	}

	public void setOwnersGroupPhoto(String ownersGroupPhoto) {
		this.ownersGroupPhoto = ownersGroupPhoto;
	}

	public String getMaterialImages1() {
		return materialImages1;
	}

	public void setMaterialImages1(String materialImages1) {
		this.materialImages1 = materialImages1;
	}

	public String getMaterialImages2() {
		return materialImages2;
	}

	public void setMaterialImages2(String materialImages2) {
		this.materialImages2 = materialImages2;
	}

	public String getMaterialImages3() {
		return materialImages3;
	}

	public void setMaterialImages3(String materialImages3) {
		this.materialImages3 = materialImages3;
	}

	public String getMaterialImages4() {
		return materialImages4;
	}

	public void setMaterialImages4(String materialImages4) {
		this.materialImages4 = materialImages4;
	}

	public int getPrice() {
		return price;
	}

	public void setPrice(int price) {
		this.price = price;
	}

	public int getTransferPrice() {
		return transferPrice;
	}

	public void setTransferPrice(int transferPrice) {
		this.transferPrice = transferPrice;
	}

	public int getLastPrice() {
		return lastPrice;
	}

	public void setLastPrice(int lastPrice) {
		this.lastPrice = lastPrice;
	}

	public int getBusinessType() {
		return businessType;
	}

	public void setBusinessType(int businessType) {
		this.businessType = businessType;
	}

	public int getSourceType() {
		return sourceType;
	}

	public void setSourceType(int sourceType) {
		this.sourceType = sourceType;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public Timestamp getAgentTime() {
		return agentTime;
	}

	public void setAgentTime(Timestamp agentTime) {
		this.agentTime = agentTime;
	}

	public int getGh_printnum() {
		return gh_printnum;
	}

	public void setGh_printnum(int ghPrintnum) {
		gh_printnum = ghPrintnum;
	}

	public int getPrintStatus() {
		return printStatus;
	}

	public void setPrintStatus(int printStatus) {
		this.printStatus = printStatus;
	}

	public int getTransferType() {
		return transferType;
	}

	public void setTransferType(int transferType) {
		this.transferType = transferType;
	}

	public String getNewLicensePlate() {
		return newLicensePlate;
	}

	public void setNewLicensePlate(String newLicensePlate) {
		this.newLicensePlate = newLicensePlate;
	}

	public String getCarMarketIn() {
		return carMarketIn;
	}

	public void setCarMarketIn(String carMarketIn) {
		this.carMarketIn = carMarketIn;
	}

	public String getMoveOutProvince() {
		return moveOutProvince;
	}

	public void setMoveOutProvince(String moveOutProvince) {
		this.moveOutProvince = moveOutProvince;
	}

	public String getMoveOutCity() {
		return moveOutCity;
	}

	public void setMoveOutCity(String moveOutCity) {
		this.moveOutCity = moveOutCity;
	}

	public String getTaxNo() {
		return taxNo;
	}

	public void setTaxNo(String taxNo) {
		this.taxNo = taxNo;
	}

	public String getPaymentPeople() {
		return paymentPeople;
	}

	public void setPaymentPeople(String paymentPeople) {
		this.paymentPeople = paymentPeople;
	}

	public int getGainType() {
		return gainType;
	}

	public void setGainType(int gainType) {
		this.gainType = gainType;
	}

	public String getManagersId() {
		return managersId;
	}

	public void setManagersId(String managersId) {
		this.managersId = managersId;
	}

	public int getInsertUserid() {
		return insertUserid;
	}

	public void setInsertUserid(int insertUserid) {
		this.insertUserid = insertUserid;
	}

	public Timestamp getInsertTime() {
		return insertTime;
	}

	public void setInsertTime(Timestamp insertTime) {
		this.insertTime = insertTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public int getUpdateUserId() {
		return updateUserId;
	}

	public void setUpdateUserId(int updateUserId) {
		this.updateUserId = updateUserId;
	}

	public String getPg_time() {
		return pg_time;
	}

	public void setPg_time(String pgTime) {
		pg_time = pgTime;
	}

	public int getCflag() {
		return cflag;
	}

	public void setCflag(int cflag) {
		this.cflag = cflag;
	}

	public int getNum() {
		return num;
	}

	public void setNum(int num) {
		this.num = num;
	}

	public String getInsertTimeS() {
		return insertTimeS;
	}

	public void setInsertTimeS(String insertTimeS) {
		this.insertTimeS = insertTimeS;
	}

	public String getBrandModel() {
		return brandModel;
	}

	public void setBrandModel(String brandModel) {
		this.brandModel = brandModel;
	}

	public String getOwnerTypeName() {
		return ownerTypeName;
	}

	public void setOwnerTypeName(String ownerTypeName) {
		this.ownerTypeName = ownerTypeName;
	}

	public int getCarClass() {
		return carClass;
	}

	public void setCarClass(int carClass) {
		this.carClass = carClass;
	}

	public String getOwnerPhone() {
		return ownerPhone;
	}

	public void setOwnerPhone(String ownerPhone) {
		this.ownerPhone = ownerPhone;
	}

	public int getLz_printnum() {
		return lz_printnum;
	}

	public void setLz_printnum(int lzPrintnum) {
		lz_printnum = lzPrintnum;
	}

	public Date getLz_printTime() {
		return lz_printTime;
	}

	public void setLz_printTime(Date lzPrintTime) {
		lz_printTime = lzPrintTime;
	}

	public int getLz_printUserId() {
		return lz_printUserId;
	}

	public void setLz_printUserId(int lzPrintUserId) {
		lz_printUserId = lzPrintUserId;
	}

	public String getLc_printTime() {
		return lc_printTime;
	}

	public void setLc_printTime(String lcPrintTime) {
		lc_printTime = lcPrintTime;
	}

	public int getLc_printUserId() {
		return lc_printUserId;
	}

	public void setLc_printUserId(int lcPrintUserId) {
		lc_printUserId = lcPrintUserId;
	}

	public String getCy_printTime() {
		return cy_printTime;
	}

	public void setCy_printTime(String cyPrintTime) {
		cy_printTime = cyPrintTime;
	}

	public int getCy_printUserId() {
		return cy_printUserId;
	}

	public void setCy_printUserId(int cyPrintUserId) {
		cy_printUserId = cyPrintUserId;
	}

	public String getPg_printTime() {
		return pg_printTime;
	}

	public void setPg_printTime(String pgPrintTime) {
		pg_printTime = pgPrintTime;
	}

	public int getPg_printUserId() {
		return pg_printUserId;
	}

	public void setPg_printUserId(int pgPrintUserId) {
		pg_printUserId = pgPrintUserId;
	}

	public String getDb_printTime() {
		return db_printTime;
	}

	public void setDb_printTime(String dbPrintTime) {
		db_printTime = dbPrintTime;
	}

	public int getDb_printUserId() {
		return db_printUserId;
	}

	public void setDb_printUserId(int dbPrintUserId) {
		db_printUserId = dbPrintUserId;
	}

	public String getNewOwnerTelPhone() {
		return newOwnerTelPhone;
	}

	public void setNewOwnerTelPhone(String newOwnerTelPhone) {
		this.newOwnerTelPhone = newOwnerTelPhone;
	}

	public int getExtendedPrice() {
		return extendedPrice;
	}

	public void setExtendedPrice(int extendedPrice) {
		this.extendedPrice = extendedPrice;
	}

	public int getDoubleTransferPrice() {
		return doubleTransferPrice;
	}

	public void setDoubleTransferPrice(int doubleTransferPrice) {
		this.doubleTransferPrice = doubleTransferPrice;
	}

	public String getGh_printTime() {
		return gh_printTime;
	}

	public void setGh_printTime(String ghPrintTime) {
		gh_printTime = ghPrintTime;
	}

	public int getGh_printUserId() {
		return gh_printUserId;
	}

	public void setGh_printUserId(int ghPrintUserId) {
		gh_printUserId = ghPrintUserId;
	}

	public String getTransNo() {
		return transNo;
	}

	public void setTransNo(String transNo) {
		this.transNo = transNo;
	}

	public String getTransMarket() {
		return transMarket;
	}

	public void setTransMarket(String transMarket) {
		this.transMarket = transMarket;
	}

	public String getAttnId() {
		return attnId;
	}

	public String getLicensePlateCol() {
		return licensePlateCol;
	}

	public void setLicensePlateCol(String licensePlateCol) {
		this.licensePlateCol = licensePlateCol;
	}

	public void setAttnId(String attnId) {
		this.attnId = attnId;
	}

	public int getZy_printnum() {
		return zy_printnum;
	}

	public void setZy_printnum(int zyPrintnum) {
		zy_printnum = zyPrintnum;
	}

	public String getZy_printTime() {
		return zy_printTime;
	}

	public void setZy_printTime(String zyPrintTime) {
		zy_printTime = zyPrintTime;
	}

	public int getZy_printUserId() {
		return zy_printUserId;
	}

	public void setZy_printUserId(int zyPrintUserId) {
		zy_printUserId = zyPrintUserId;
	}

	public int getXs_printnum() {
		return xs_printnum;
	}

	public void setXs_printnum(int xsPrintnum) {
		xs_printnum = xsPrintnum;
	}

	public String getXs_printTime() {
		return xs_printTime;
	}

	public void setXs_printTime(String xsPrintTime) {
		xs_printTime = xsPrintTime;
	}

	public int getXs_printUserId() {
		return xs_printUserId;
	}

	public void setXs_printUserId(int xsPrintUserId) {
		xs_printUserId = xsPrintUserId;
	}

	public String getNewOwnerZipCode() {
		return newOwnerZipCode;
	}

	public void setNewOwnerZipCode(String newOwnerZipCode) {
		this.newOwnerZipCode = newOwnerZipCode;
	}

	public Timestamp getLicenseAccepTime() {
		return licenseAccepTime;
	}

	public void setLicenseAccepTime(Timestamp licenseAccepTime) {
		this.licenseAccepTime = licenseAccepTime;
	}

	public String getNewOwnerMailAddress() {
		return newOwnerMailAddress;
	}

	public void setNewOwnerMailAddress(String newOwnerMailAddress) {
		this.newOwnerMailAddress = newOwnerMailAddress;
	}

	public int getPreTransfer() {
		return preTransfer;
	}

	public void setPreTransfer(int preTransfer) {
		this.preTransfer = preTransfer;
	}

	public int getChangeTradeTicket() {
		return changeTradeTicket;
	}

	public void setChangeTradeTicket(int changeTradeTicket) {
		this.changeTradeTicket = changeTradeTicket;
	}

	public int getWaitForStatus() {
		return waitForStatus;
	}

	public void setWaitForStatus(int waitForStatus) {
		this.waitForStatus = waitForStatus;
	}

	public String getLicenseAccepTimeS() {
		return licenseAccepTimeS;
	}

	public void setLicenseAccepTimeS(String licenseAccepTimeS) {
		this.licenseAccepTimeS = licenseAccepTimeS;
	}

	public int getCheckUserid() {
		return checkUserid;
	}

	public void setCheckUserid(int checkUserid) {
		this.checkUserid = checkUserid;
	}

	public String getUpdateUserName() {
		return updateUserName;
	}

	public void setUpdateUserName(String updateUserName) {
		this.updateUserName = updateUserName;
	}

	public String getVonderModel() {
		return vonderModel;
	}

	public void setVonderModel(String vonderModel) {
		this.vonderModel = vonderModel;
	}

	public Timestamp getCheckFileTime() {
		return checkFileTime;
	}

	public Timestamp getCheckPriceDate() {
		return checkPriceDate;
	}

	public void setCheckPriceDate(Timestamp checkPriceDate) {
		this.checkPriceDate = checkPriceDate;
	}

	public void setCheckFileTime(Timestamp checkFileTime) {
		this.checkFileTime = checkFileTime;
	}

	public Timestamp getCheckFileBackTime() {
		return checkFileBackTime;
	}

	public void setCheckFileBackTime(Timestamp checkFileBackTime) {
		this.checkFileBackTime = checkFileBackTime;
	}

	public int getPicChangeNum() {
		return picChangeNum;
	}

	public void setPicChangeNum(int picChangeNum) {
		this.picChangeNum = picChangeNum;
	}

	public Timestamp getPicChangeTime() {
		return picChangeTime;
	}

	public void setPicChangeTime(Timestamp picChangeTime) {
		this.picChangeTime = picChangeTime;
	}

	public int getPicChangeUserId() {
		return picChangeUserId;
	}

	public void setPicChangeUserId(int picChangeUserId) {
		this.picChangeUserId = picChangeUserId;
	}

	public String getMemberId() {
		return memberId;
	}

	public void setMemberId(String memberId) {
		this.memberId = memberId;
	}

	public int getCheckFileStatus() {
		return checkFileStatus;
	}

	public void setCheckFileStatus(int checkFileStatus) {
		this.checkFileStatus = checkFileStatus;
	}

	public int getCheckPrice() {
		return checkPrice;
	}

	public void setCheckPrice(int checkPrice) {
		this.checkPrice = checkPrice;
	}

	public Timestamp getTransferPriceDate() {
		return transferPriceDate;
	}

	public void setTransferPriceDate(Timestamp transferPriceDate) {
		this.transferPriceDate = transferPriceDate;
	}

	/**
	 * @param vendorId
	 *            the vendorId to set
	 */
	public void setVendorId(String vendorId) {
		this.vendorId = vendorId;
	}

	/**
	 * @return the vendorId
	 */
	public String getVendorId() {
		return vendorId;
	}

	/**
	 * @param brandId
	 *            the brandId to set
	 */
	public void setBrandId(String brandId) {
		this.brandId = brandId;
	}

	/**
	 * @return the brandId
	 */
	public String getBrandId() {
		return brandId;
	}

	/**
	 * @param carStyleId
	 *            the carStyleId to set
	 */
	public void setCarStyleId(String carStyleId) {
		this.carStyleId = carStyleId;
	}

	/**
	 * @return the carStyleId
	 */
	public String getCarStyleId() {
		return carStyleId;
	}

	/**
	 * @param carName
	 *            the carName to set
	 */
	public void setCarName(String carName) {
		this.carName = carName;
	}

	/**
	 * @return the carName
	 */
	public String getCarName() {
		return carName;
	}

	/**
	 * @param isMatch
	 *            the isMatch to set
	 */
	public void setIsMatch(int isMatch) {
		this.isMatch = isMatch;
	}

	/**
	 * @return the isMatch
	 */
	public int getIsMatch() {
		return isMatch;
	}

	public String getVendorCode() {
		return vendorCode;
	}

	public void setVendorCode(String vendorCode) {
		this.vendorCode = vendorCode;
	}

	public String getModelCode() {
		return modelCode;
	}

	public void setModelCode(String modelCode) {
		this.modelCode = modelCode;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getUserName() {
		return userName;
	}

    public String getMaterialImages5() {
		return materialImages5;
	}

	public void setMaterialImages5(String materialImages5) {
		this.materialImages5 = materialImages5;
	}

	public void setCarMarketInProv(int carMarketInProv) {
		this.carMarketInProv = carMarketInProv;
	}

	public int getCarMarketInProv() {
		return carMarketInProv;
	}

	public void setCarMarketInCity(int carMarketInCity) {
		this.carMarketInCity = carMarketInCity;
	}

	public int getCarMarketInCity() {
		return carMarketInCity;
	}

	public void setShiftToLevel(String shiftToLevel) {
		this.shiftToLevel = shiftToLevel;
	}

	public String getShiftToLevel() {
		return shiftToLevel;
	}

	public void setProName(String proName) {
		this.proName = proName;
	}

	public String getProName() {
		return proName;
	}

	public void setCityName(String cityName) {
		this.cityName = cityName;
	}

	public String getCityName() {
		return cityName;
	}
	

	public void setEpStandard(int epStandard) {
		this.epStandard = epStandard;
	}

	public int getEpStandard() {
		return epStandard;
	}

	public void setCarReplaceType(int carReplaceType) {
		this.carReplaceType = carReplaceType;
	}

	public int getCarReplaceType() {
		return carReplaceType;
	}

	public void setCarPeccancy(int carPeccancy) {
		this.carPeccancy = carPeccancy;
	}

	public int getCarPeccancy() {
		return carPeccancy;
	}

	public void setOverdue(int overdue) {
		this.overdue = overdue;
	}

	public int getOverdue() {
		return overdue;
	}

	public void setMortgage(int mortgage) {
		this.mortgage = mortgage;
	}

	public int getMortgage() {
		return mortgage;
	}

	public void setSealup(int sealup) {
		this.sealup = sealup;
	}

	public int getSealup() {
		return sealup;
	}

	public void setDrivingLicense(int drivingLicense) {
		this.drivingLicense = drivingLicense;
	}

	public int getDrivingLicense() {
		return drivingLicense;
	}

	public void setScrapOverdue(int scrapOverdue) {
		this.scrapOverdue = scrapOverdue;
	}

	public int getScrapOverdue() {
		return scrapOverdue;
	}

	public void setRobbery(int robbery) {
		this.robbery = robbery;
	}

	public int getRobbery() {
		return robbery;
	}

	public void setPsRemark(String psRemark) {
		this.psRemark = psRemark;
	}

	public String getPsRemark() {
		return psRemark;
	}

	public void setOwnerEscaping(int ownerEscaping) {
		this.ownerEscaping = ownerEscaping;
	}

	public int getOwnerEscaping() {
		return ownerEscaping;
	}

	public void setOwnerScrap(int ownerScrap) {
		this.ownerScrap = ownerScrap;
	}

	public int getOwnerScrap() {
		return ownerScrap;
	}

	public void setOwnerRemark(String ownerRemark) {
		this.ownerRemark = ownerRemark;
	}

	public String getOwnerRemark() {
		return ownerRemark;
	}

	public void setNewEscaping(int newEscaping) {
		this.newEscaping = newEscaping;
	}

	public int getNewEscaping() {
		return newEscaping;
	}

	public void setNewScrap(int newScrap) {
		this.newScrap = newScrap;
	}

	public int getNewScrap() {
		return newScrap;
	}

	public void setNewLive(int newLive) {
		this.newLive = newLive;
	}

	public int getNewLive() {
		return newLive;
	}

	public void setNewRemark(String newRemark) {
		this.newRemark = newRemark;
	}

	public String getNewRemark() {
		return newRemark;
	}

	public String getAttnName() {
		return attnName;
	}

	public void setAttnName(String attnName) {
		this.attnName = attnName;
	}

	public String getRealName() {
		return realName;
	}

	public void setRealName(String realName) {
		this.realName = realName;
	}

	public String getCheckFileTimeS() {
		return checkFileTimeS;
	}

	public void setCheckFileTimeS(String checkFileTimeS) {
		this.checkFileTimeS = checkFileTimeS;
	}
	
	
    public List<TransferAcceptedInfo> getAcceptInfoList(String serial,String licensePlate) throws TmsDaoException
    {
        TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO); 
        List<TransferAcceptedInfo> entity = new ArrayList<TransferAcceptedInfo>();
        List<TransferAcceptedInfoDto> dto = uDao.getAcceptInfo(serial,licensePlate);
        if(dto!=null)
        {
            for (TransferAcceptedInfoDto item:dto) {
                TransferAcceptedInfo entityItem = new TransferAcceptedInfo();
                entity.add(setEntityFromDto(entityItem, item));
            }
        }
        return entity;
    }
    public boolean isSameMemberIdBetweenAttnAndCar(String userId,String serial,String licensePlate) throws TmsDaoException{
        TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO); 
        return uDao.isSameMemberIdBetweenAttnAndCar(userId, serial, licensePlate);
    }
    
    /**
     * 过户业务基本信息表 
     * 
     * @param entity
     * @throws TmsDaoException
     */
    public void updateConformityMarkBySerial(TransferAcceptedInfo entity)
            throws TmsDaoException {
        TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao
                .getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO);
        TransferAcceptedInfoDto dto = new TransferAcceptedInfoDto();
        dto = entityToDtoBySerial(entity, dto);
        uDao.updateConformityMarkBySerial(dto);

    }
    //
    /**
     * 变更车主信息
     * @return
     * @throws TmsDaoException 
     */
    public void updateChangeTableBySerial(TransferAcceptedInfo entity) throws TmsDaoException
    {
        TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO); 
        TransferAcceptedInfoDto dto = new TransferAcceptedInfoDto();
        dto = setDtoFromEntity(entity, dto);
        uDao.updateChangeTableBySerial(dto);
    }
    public TransferAcceptedInfo getAcceptInfoOnlyBySerial(String serial,String licensePlate) throws TmsDaoException {

        TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO); 
//        List<TransferAcceptedInfo> entity = new ArrayList<TransferAcceptedInfo>();
        TransferAcceptedInfoDto dto = uDao.getAcceptInfoOnlyBySerial(serial,licensePlate);
        TransferAcceptedInfo entityItem = new TransferAcceptedInfo();
        if(dto!=null)
        {
            setEntityFromDto(entityItem, dto);
        }
        return entityItem;
    }
    /**
     * 制证受理
     * @return
     * @throws TmsDaoException 
     */
    public void updateNewLicensePlateBySerial(TransferAcceptedInfo entity) throws TmsDaoException
    {
        TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO); 
        TransferAcceptedInfoDto dto = new TransferAcceptedInfoDto();
        dto = setDtoFromEntity(entity, dto);
        uDao.updateAcceptStatusToNewLicensePlateBySerial(dto);
    }
    
    
    private String dailyCount;	//今日业务量
    private String dailyPayment; //应支付
    private String dailyPaymented; //实际支付
    private String dailyRemain;//今日余额
    private String dailyTransfer ;//今日充值
    private String dailyWarning;//差异预警
    private String countDate;//查询日
    private String totalDailyRemain;//今日全部用户余额
    private String no;
    private List<TransferAcceptedInfo> dailyInfo;

	public String getDailyCount() {
		return dailyCount;
	}

	public void setDailyCount(String dailyCount) {
		this.dailyCount = dailyCount;
	}

	public String getTotalDailyRemain() {
		return totalDailyRemain;
	}

	public void setTotalDailyRemain(String totalDailyRemain) {
		this.totalDailyRemain = totalDailyRemain;
	}

	public String getNo() {
		return no;
	}

	public void setNo(String no) {
		this.no = no;
	}

	public String getCountDate() {
		return countDate;
	}

	public void setCountDate(String countDate) {
		this.countDate = countDate;
	}

	public String getDailyPayment() {
		return dailyPayment;
	}

	public void setDailyPayment(String dailyPayment) {
		this.dailyPayment = dailyPayment;
	}

	public String getDailyPaymented() {
		return dailyPaymented;
	}

	public void setDailyPaymented(String dailyPaymented) {
		this.dailyPaymented = dailyPaymented;
	}

	public String getDailyRemain() {
		return dailyRemain;
	}

	public void setDailyRemain(String dailyRemain) {
		this.dailyRemain = dailyRemain;
	}

	public String getDailyTransfer() {
		return dailyTransfer;
	}

	public void setDailyTransfer(String dailyTransfer) {
		this.dailyTransfer = dailyTransfer;
	}

	public String getDailyWarning() {
		return dailyWarning;
	}

	public void setDailyWarning(String dailyWarning) {
		this.dailyWarning = dailyWarning;
	}

	public List<TransferAcceptedInfo> getDailyInfo() {
		return dailyInfo;
	}

	public void setDailyInfo(List<TransferAcceptedInfo> dailyInfo) {
		this.dailyInfo = dailyInfo;
	}

	/**
	 * 
	 * @param date yyyyMMdd
	 * @return
	 * @throws TmsDaoException
	 */
    public TransferAcceptedInfo findDailyAcceptInfo(String date) throws TmsDaoException {
        TransferAcceptedInfoDao uDao = (TransferAcceptedInfoDao) TmsDao.getInstance(TmsDao.TMS_TRANSFER_ACCEPTED_INFO); 
        List<TransferAcceptedInfo> list = uDao.findDailyAcceptInfo(date);
        BigDecimal count = BigDecimal.ZERO;
        BigDecimal payment = BigDecimal.ZERO;
        BigDecimal paymented = BigDecimal.ZERO;
        BigDecimal transfer = BigDecimal.ZERO;
        BigDecimal remain = BigDecimal.ZERO;
        String warning = "正常";
        int i = 1;
        for (TransferAcceptedInfo info : list) {
			count = count.add(new BigDecimal(info.getDailyCount()));
			payment = payment.add(new BigDecimal(info.getDailyPayment()));
			paymented = paymented.add(new BigDecimal(info.getDailyPaymented()));
			transfer = transfer.add(new BigDecimal(info.getDailyTransfer()));
			remain = remain.add(new BigDecimal(info.getDailyRemain()));
			if(info.getDailyPayment() != null && info.getDailyPaymented() != null) {
				if(new BigDecimal(info.getDailyPayment()).compareTo(new BigDecimal(info.getDailyPaymented())) != 0) warning = "应支付与实际支付不符";
			}
			info.setNo(String.valueOf(i++));
			if (i%2 == 0){
				info.setCssFlag(1);
			} else{
				info.setCssFlag(2);
			}
		}
        TransferAcceptedInfo info = new TransferAcceptedInfo();
        info.setDailyInfo(list);
        info.setDailyCount(count.toPlainString());
        info.setDailyPayment(payment.toPlainString());
        info.setDailyPaymented(paymented.toPlainString());
        info.setDailyTransfer(transfer.toPlainString());
        info.setDailyRemain(remain.toPlainString());
        info.setDailyWarning(warning);
        info.setCountDate(date);
		AttnDao aDao = (AttnDao)TmsDao.getInstance(TmsDao.TMS_ATTN);
		List<AttnDto> all = aDao.findAllAttn();
		int totalDailyRemain = 0;
		for (AttnDto attnDto : all) totalDailyRemain = totalDailyRemain + attnDto.getVirtualMargin();
		info.setTotalDailyRemain(String.valueOf(totalDailyRemain));
        return info;
    }
}
